Commit 1927971
committed
sdexec: fix memory leak
Problem: running t2409-sdexec.t under valgrind turned up this leak:
==3040827== 86 (80 direct, 6 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 7
==3040827== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==3040827== by 0x83D415F: sdexec_channel_create (channel.c:140)
==3040827== by 0x83D42CC: sdexec_channel_create_input (channel.c:189)
==3040827== by 0x83D2040: sdproc_create (sdexec.c:511)
==3040827== by 0x83D2040: exec_cb (sdexec.c:587)
==3040827== by 0x4880407: call_handler (msg_handler.c:345)
==3040827== by 0x4880799: dispatch_message (msg_handler.c:381)
==3040827== by 0x4880799: handle_cb (msg_handler.c:482)
==3040827== by 0x48B4DA2: ev_invoke_pending (ev.c:3770)
==3040827== by 0x48B884F: ev_run (ev.c:4190)
==3040827== by 0x48B884F: ev_run (ev.c:4021)
==3040827== by 0x487F48E: flux_reactor_run (reactor.c:128)
==3040827== by 0x83D253B: mod_main (sdexec.c:1022)
==3040827== by 0x11EEC0: module_thread (module.c:185)
==3040827== by 0x4BACB42: start_thread (pthread_create.c:442)
Free the input channel when the sdproc is destroyed.1 parent 823b8a1 commit 1927971
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| 393 | + | |
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
| |||
0 commit comments