diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-03-26 14:22:47 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-03-26 14:22:47 -0400 |
commit | 245893479aea5d36cc8d500ad8a553a60bb15cc6 (patch) | |
tree | aacd25af3a65cf3c7da8008e05e6047fff027ead | |
parent | 01ea0c5c285eb0ebe56b848b7ae147eb7b4509c8 (diff) | |
download | libevent-245893479aea5d36cc8d500ad8a553a60bb15cc6.tar.gz |
Fix a free(NULL) in min_heap.h
Backport of 6f20492fa27f08
-rw-r--r-- | min_heap.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -56,7 +56,7 @@ int min_heap_elem_greater(struct event *a, struct event *b) } void min_heap_ctor(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; } -void min_heap_dtor(min_heap_t* s) { free(s->p); } +void min_heap_dtor(min_heap_t* s) { if(s->p) free(s->p); } void min_heap_elem_init(struct event* e) { e->min_heap_idx = -1; } int min_heap_empty(min_heap_t* s) { return 0u == s->n; } unsigned min_heap_size(min_heap_t* s) { return s->n; } |