Patch: Fixed signals memory leak
Black Penguin
gnomecn at gmail.com
Sun Jun 7 10:58:50 CEST 2009
Hi, there
I found there are 256 bytes still reachable after ev_default_destroy():
Valgrind log:
==1878== 256 bytes in 1 blocks are still reachable in loss record 1 of 2
==1878== at 0x4025868: malloc (vg_replace_malloc.c:207)
==1878== by 0x40259AC: realloc (vg_replace_malloc.c:429)
==1878== by 0x804B675: ev_realloc (ev.c:467)
==1878== by 0x804EFD8: ev_signal_start (ev.c:2477)
==1878== by 0x804F1B5: ev_default_loop_init (ev.c:1724)
==1878== by 0x8051357: SchedulerLibEv::SchedulerLibEv(char const*)
(ev.h:454)
==1878== by 0x804A2A7: main (test-timer-libev.cpp:80)
==1878==
ev.c
struct ANSIG *signals;
alloced in ev_default_loop() -> ev_signal_init () ...
but not freed in ev_default_destroy() -> ev_signal_stop ()
Patch is attached.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20090607/36d735bb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signals.leak.patch
Type: application/octet-stream
Size: 386 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/libev/attachments/20090607/36d735bb/attachment.obj>
More information about the libev
mailing list