diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-03-18 17:27:57 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-03-19 00:28:40 +0000 |
commit | 1fdfee69d6a96b66719d34651dfa4bdc852a23ae (patch) | |
tree | 3d7967979f9db4adba2340149517fa82b39222db /ui/qt/capture_interfaces_dialog.cpp | |
parent | ab45f1d29006d65e713f8e0bb5dc08667a9e8b80 (diff) |
Patch some memory leaks.
capture_dev_user_descr_find() and capture_dev_user_cfilter_find() return
g_malloc()ated strings; we don't need to g_strdup() them to get a
g_malloc()ated string, and we *do* need to free them if we aren't going
to use them any more.
Document that while we're at it, and give more details for the functions
returning integer user-specified interface parameters as well.
Change-Id: Icf98a48992b1c4168ead54bdc4cc2847da89d665
Reviewed-on: https://code.wireshark.org/review/7745
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/capture_interfaces_dialog.cpp')
-rw-r--r-- | ui/qt/capture_interfaces_dialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp index 89aceee1e3..f1c8539429 100644 --- a/ui/qt/capture_interfaces_dialog.cpp +++ b/ui/qt/capture_interfaces_dialog.cpp @@ -537,7 +537,7 @@ void CaptureInterfacesDialog::updateInterfaces() #endif gchar* prefFilter = capture_dev_user_cfilter_find(device->name); if (prefFilter) { - device->cfilter = g_strdup(prefFilter); + device->cfilter = prefFilter; } ti->setText(col_filter_, device->cfilter); |