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/manage_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/manage_interfaces_dialog.cpp')
-rw-r--r-- | ui/qt/manage_interfaces_dialog.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/qt/manage_interfaces_dialog.cpp b/ui/qt/manage_interfaces_dialog.cpp index 93164c5fa8..4b36fa1256 100644 --- a/ui/qt/manage_interfaces_dialog.cpp +++ b/ui/qt/manage_interfaces_dialog.cpp @@ -334,6 +334,7 @@ void ManageInterfacesDialog::showLocalInterfaces() comment = capture_dev_user_descr_find(device.name); if (comment) { item->setText(col_l_comment_, comment); + g_free(comment); } } else { continue; |