aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-05-09 22:28:57 +0200
committerPeter Wu <peter@lekensteyn.nl>2018-05-14 13:42:10 +0000
commitbb81e1807b2a5b67905cfa1594dbbb535fe8b37e (patch)
treee4f934c0210d35b7563f790bd7a7e08fa5de377c /ui/qt
parentd80acae40d14efeb857258ca923637b590dd6be9 (diff)
Free g_ptr_array_free-related memory leaks
g_ptr_array_free(a, FALSE) returns "a->pdata". Callers that do not handle this will leak memory (e.g. "tshark -G plugins"). Convert other users to use the return value instead of direct access to "a->pdata". Change-Id: I29835477d587f5f54bf0d94cdae9f375e3da3ce3 Reviewed-on: https://code.wireshark.org/review/27437 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'ui/qt')
-rw-r--r--ui/qt/funnel_string_dialog.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/qt/funnel_string_dialog.cpp b/ui/qt/funnel_string_dialog.cpp
index cd316fae30..affc5e8bca 100644
--- a/ui/qt/funnel_string_dialog.cpp
+++ b/ui/qt/funnel_string_dialog.cpp
@@ -74,9 +74,8 @@ void FunnelStringDialog::on_buttonBox_accepted()
}
g_ptr_array_add(returns, NULL);
- dialog_cb_((gchar**)returns->pdata, dialog_cb_data_);
-
- g_ptr_array_free(returns, FALSE);
+ gchar **user_input = (gchar **)g_ptr_array_free(returns, FALSE);
+ dialog_cb_(user_input, dialog_cb_data_);
}
void FunnelStringDialog::stringDialogNew(const QString title, const QStringList field_name_list, funnel_dlg_cb_t dialog_cb, void *dialog_cb_data)