fixed timeq (free name before executing the callback)
authorpk910 <philipp@zoelle1.de>
Thu, 18 Oct 2012 22:48:36 +0000 (00:48 +0200)
committerpk910 <philipp@zoelle1.de>
Thu, 18 Oct 2012 22:48:36 +0000 (00:48 +0200)
src/timeq.c

index c18227a9d9b837aec76a18033a0e8a9579969170..ec9ea3e4017803440e5c5c63637e9b8aaa7ffbab 100644 (file)
@@ -30,6 +30,10 @@ static IOHANDLER_CALLBACK(timeq_callback) {
     struct timeq_entry *entry = event->iofd->data;
     switch(event->type) {
     case IOEVENT_TIMEOUT:
     struct timeq_entry *entry = event->iofd->data;
     switch(event->type) {
     case IOEVENT_TIMEOUT:
+        if(entry->name) {
+            free(entry->name);
+            entry->name = NULL;
+        }
         entry->callback(entry->data);
         entry->iofd = NULL;
         timeq_del(entry);
         entry->callback(entry->data);
         entry->iofd = NULL;
         timeq_del(entry);