diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2018-10-15 20:41:39 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2018-10-17 17:46:22 +0000 |
commit | c826e2a77e21a6f010073956bc0103997584b881 (patch) | |
tree | c425d7d8bf8880dd97554e235313090c969823e6 /extcap.c | |
parent | ca50195f1148b855c9fd788725dba77aa4b08315 (diff) |
extcap: Close stdout_fd and stderr_fd when done
The documentation for g_spawn_async_with_pipes() states that stdout_fd
and stderr_fd must be closed when they are no longer in use.
Ping-Bug: 15205
Change-Id: I943eaa68058b0828686469672ea3611e67390b2f
Reviewed-on: https://code.wireshark.org/review/30221
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'extcap.c')
-rw-r--r-- | extcap.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1187,6 +1187,16 @@ void extcap_if_cleanup(capture_options *capture_opts, gchar **errormsg) interface_opts->extcap_child_watch = 0; } + if (pipedata->stdout_fd > 0) + { + ws_close(pipedata->stdout_fd); + } + + if (pipedata->stderr_fd > 0) + { + ws_close(pipedata->stderr_fd); + } + if (interface_opts->extcap_pid != WS_INVALID_PID) { #ifdef _WIN32 |