]> mj.ucw.cz Git - libucw.git/commitdiff
mempool: Fixed a memory leak in mp_pop().
authorPavel Charvat <pchar@ucw.cz>
Mon, 5 Dec 2011 10:21:42 +0000 (11:21 +0100)
committerPavel Charvat <pchar@ucw.cz>
Mon, 5 Dec 2011 10:21:42 +0000 (11:21 +0100)
ucw/mempool.c

index d04e15ef815510bf1a97e42d859b4b05daa01a86..f776caaaf989c42ccf4848e9ff74188b592d3bf2 100644 (file)
@@ -344,8 +344,7 @@ void
 mp_pop(struct mempool *pool)
 {
   ASSERT(pool->state.next);
-  struct mempool_state state = pool->state;
-  mp_restore(pool, &state);
+  mp_restore(pool, pool->state.next);
 }
 
 #ifdef TEST