aboutsummaryrefslogtreecommitdiffstats
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:28 +0000
commitf4a0a34335386e2cc44a5b93246ea893b78ffa86 (patch)
tree754ee9d870b2779f33429c9efcbdc8cdfb6e076c
parentb9eac255fe606ac747b8cde50d030731f684ec03 (diff)
downloadwireshark-f4a0a34335386e2cc44a5b93246ea893b78ffa86.tar.gz
wireshark-f4a0a34335386e2cc44a5b93246ea893b78ffa86.tar.bz2
wireshark-f4a0a34335386e2cc44a5b93246ea893b78ffa86.zip
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> (cherry picked from commit 5ebfbf4fec09b0c316d97a339733af7379c73398) Reviewed-on: https://code.wireshark.org/review/17073
-rw-r--r--extcap.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/extcap.c b/extcap.c
index 198835f975..b2ca65e729 100644
--- a/extcap.c
+++ b/extcap.c
@@ -758,21 +758,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;