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>
This commit is contained in:
parent
ca50195f11
commit
c826e2a77e
10
extcap.c
10
extcap.c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue