summaryrefslogtreecommitdiff
path: root/extcap.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2016-08-15 19:25:15 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2016-08-15 20:52:07 +0000
commit5ebfbf4fec09b0c316d97a339733af7379c73398 (patch)
tree4867c1771705bdfcfa541f93dde8b2681e9f6912 /extcap.c
parent4b403b0b5472333fb3751b695632e219c364f4d5 (diff)
downloadwireshark-5ebfbf4fec09b0c316d97a339733af7379c73398.tar.gz
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.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/extcap.c b/extcap.c
index 7747d72a85..28312a01a1 100644
--- a/extcap.c
+++ b/extcap.c
@@ -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;