Do not free the signal index unless it was at some point allocated

svn:r1217
This commit is contained in:
Nick Mathewson 2009-04-21 18:47:53 +00:00
parent 7f1855d064
commit d3fbe7fa05
2 changed files with 4 additions and 2 deletions

View File

@ -1,7 +1,8 @@
Changes in 2.0.2-alpha:
o Add a new flag to bufferevents to make all callbacks automatically deferred.
o Make evdns functionality locked, and automatically defer dns callbacks.
o Fix a possible free(NULL) when freeing an event_base with no signals.
Changes in 2.0.1-alpha:
o free minheap on event_base_free(); from Christopher Layne
o debug cleanups in signal.c; from Christopher Layne

View File

@ -337,5 +337,6 @@ evsig_dealloc(struct event_base *base)
base->sig.sh_old_max = 0;
/* per index frees are handled in evsig_del() */
mm_free(base->sig.sh_old);
if (base->sig.sh_old)
mm_free(base->sig.sh_old);
}