Fix potential use after free
authorThomas Egerer <thomas.egerer@secunet.com>
Tue, 18 Jan 2011 14:59:35 +0000 (15:59 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 19 Jan 2011 08:59:01 +0000 (09:59 +0100)
src/libcharon/bus/bus.c

index ab8d0fc..23931c4 100644 (file)
@@ -227,13 +227,13 @@ static bool log_cb(entry_t *entry, log_data_t *data)
                {
                        entry->blocker = FALSE;
                        entry->condvar->signal(entry->condvar);
+                       entry->calling--;
                }
                else
                {
                        entry_destroy(entry);
                }
                va_end(args);
-               entry->calling--;
                return TRUE;
        }
        va_end(args);