diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-08-15 19:25:15 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2016-08-15 20:52:07 +0000 |
commit | 5ebfbf4fec09b0c316d97a339733af7379c73398 (patch) | |
tree | 4867c1771705bdfcfa541f93dde8b2681e9f6912 /extcap.c | |
parent | 4b403b0b5472333fb3751b695632e219c364f4d5 (diff) |
extcap: Fix Dereference of null pointer
Change-Id: I03098de9bd8684953a4fe024a3e6b604eeecf03f
Reviewed-on: https://code.wireshark.org/review/17066
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'extcap.c')
-rw-r--r-- | extcap.c | 19 |
1 files changed, 8 insertions, 11 deletions
@@ -765,21 +765,18 @@ void extcap_if_cleanup(capture_options * capture_opts, gchar ** errormsg) { } g_free(buffer); } - } #ifndef _WIN32 - /* Final child watch may not have been called */ - if ( interface_opts.extcap_child_watch != 0 ) - { - extcap_child_watch_cb(userdata->pid, 0, capture_opts); - /* it will have changed in extcap_child_watch_cb */ - interface_opts = g_array_index(capture_opts->ifaces, interface_options, - icnt); - } + /* Final child watch may not have been called */ + if ( interface_opts.extcap_child_watch != 0 ) + { + extcap_child_watch_cb(userdata->pid, 0, capture_opts); + /* it will have changed in extcap_child_watch_cb */ + interface_opts = g_array_index(capture_opts->ifaces, interface_options, + icnt); + } #endif - if ( userdata ) - { if ( userdata->extcap_stderr != NULL ) overwrite_exitcode = TRUE; |