X-Git-Url: http://git.pk910.de/?p=NextIRCd.git;a=blobdiff_plain;f=src%2FIOHandler%2FIOGarbageCollector.c;h=cf25700c285064ea2ad15400d045e1576f530e8f;hp=d62439685ce29f90de01b847b1ea2512214bc9dc;hb=f40d2e60142d1cb141c46e63ed847b0d821ca920;hpb=41292e20c03e930e8fb3a03f1607fd71b4c1c6bb diff --git a/src/IOHandler/IOGarbageCollector.c b/src/IOHandler/IOGarbageCollector.c index d624396..cf25700 100644 --- a/src/IOHandler/IOGarbageCollector.c +++ b/src/IOHandler/IOGarbageCollector.c @@ -61,14 +61,14 @@ void iogc_add_callback(void *object, iogc_free *free_callback) { return; } struct IOGCObject *obj = malloc(sizeof(*obj)); - if(!obj) { - iolog_trigger(IOLOG_ERROR, "could not allocate memory for IOGCObject in %s:%d", __FILE__, __LINE__); + if(!obj) { + iolog_trigger(IOLOG_ERROR, "could not allocate memory for IOGCObject in %s:%d", __FILE__, __LINE__); if(free_callback) free_callback(object); else free(object); - return; - } + return; + } obj->object = object; obj->free_callback = free_callback; gettimeofday(&obj->timeout, NULL);