Eo: Don't write to pointer after free.
authorTom Hacohen <tom@stosb.com>
Mon, 30 Sep 2013 13:15:37 +0000 (14:15 +0100)
committerTom Hacohen <tom@stosb.com>
Mon, 30 Sep 2013 13:15:37 +0000 (14:15 +0100)
Fixes coverity: CID 1039898.

src/lib/eo/eo_base_class.c

index 33f826a..98a6a0d 100644 (file)
@@ -422,9 +422,9 @@ struct _Eo_Callback_Description
 static void
 _eo_callback_remove(Private_Data *pd, Eo_Callback_Description *cb)
 {
-   Eo_Callback_Description *itr, *pitr;
+   Eo_Callback_Description *itr, *pitr = NULL;
 
-   itr = pitr = pd->callbacks;
+   itr = pd->callbacks;
    if (pd->callbacks == cb)
       pd->callbacks = cb->next;