ippool: Clear allocated block pointer at cleanup
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 12 Jun 2013 08:02:57 +0000 (11:02 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 12 Jun 2013 12:53:43 +0000 (15:53 +0300)
Without this the unit tests might core dump as the allocated_block
pointer would point to already freed memory.

src/ippool.c

index 531745e..ba613fb 100644 (file)
@@ -465,4 +465,5 @@ void __connman_ippool_cleanup(void)
 
        g_slist_free(allocated_blocks);
        last_block = 0;
+       allocated_blocks = NULL;
 }