Fix Coverity run 12 CID 110: Make sure we don't dereference a NULL pointer.
authorGerald Combs <gerald@wireshark.org>
Tue, 7 Mar 2006 19:17:00 +0000 (19:17 -0000)
committerGerald Combs <gerald@wireshark.org>
Tue, 7 Mar 2006 19:17:00 +0000 (19:17 -0000)
svn path=/trunk/; revision=17505

conditions.c

index 939ed260e013f0d2877c7182a06b368421881f0a..941fbae02bda4089061fb10b0f01e027b893975b 100644 (file)
@@ -86,9 +86,11 @@ condition* cnd_new(const char* class_id, ...){
 
 void cnd_delete(condition *cnd){
   _cnd_class *cls = NULL;
-  const char* class_id = cnd->class_id;
+  const char* class_id;
   /* check for valid pointer */
   if(cnd == NULL) return;
+
+  class_id = cnd->class_id;
   /* check if hash table is already initialized */
   _cnd_init();
   /* get the condition class */