From c47503fd5fe46783148323d7b3347be1d3c01be2 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Tue, 7 Mar 2006 19:17:00 +0000 Subject: Fix Coverity run 12 CID 110: Make sure we don't dereference a NULL pointer. svn path=/trunk/; revision=17505 --- conditions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'conditions.c') diff --git a/conditions.c b/conditions.c index 939ed260e0..941fbae02b 100644 --- a/conditions.c +++ b/conditions.c @@ -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 */ -- cgit v1.2.1