X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fbasic%2Fprioq.c;h=4570b8e4baab44afa49ef667257833be54568fde;hp=75906989114bc4add71ccf8cd602e06b552e4129;hb=084937b3d7c4da3e3c48d05779f8cfbdc39a2ce6;hpb=eaca07ccfdf5d7dabc50afc7e539c2413dd69d3e diff --git a/src/basic/prioq.c b/src/basic/prioq.c index 759069891..4570b8e4b 100644 --- a/src/basic/prioq.c +++ b/src/basic/prioq.c @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - /*** This file is part of systemd. @@ -29,9 +27,12 @@ * The underlying algorithm used in this implementation is a Heap. */ +#include +#include + #include "alloc-util.h" +#include "hashmap.h" #include "prioq.h" -#include "util.h" struct prioq_item { void *data; @@ -61,9 +62,7 @@ Prioq* prioq_free(Prioq *q) { return NULL; free(q->items); - free(q); - - return NULL; + return mfree(q); } int prioq_ensure_allocated(Prioq **q, compare_func_t compare_func) {