diff options
author | Michael Mann <mmann78@netscape.net> | 2017-01-31 08:29:53 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-01-31 17:08:54 +0000 |
commit | 148fb1acf46e205801e4e06f4f3f755a13bd2a48 (patch) | |
tree | 7fac7a3cf2e986a2ac22f9637f6b4fdd73aae392 /ui/gtk/airpcap_gui_utils.c | |
parent | 51a30142251e377ec28eb8584c56386c2481d6c0 (diff) |
Add wmem allocator parameter to format_uri
Change-Id: Ic6de84a37b501e9c62a7d37071b2b081a1a1dd50
Reviewed-on: https://code.wireshark.org/review/19885
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/gtk/airpcap_gui_utils.c')
-rw-r--r-- | ui/gtk/airpcap_gui_utils.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/ui/gtk/airpcap_gui_utils.c b/ui/gtk/airpcap_gui_utils.c index 61fa4cd6bd..c1341eda32 100644 --- a/ui/gtk/airpcap_gui_utils.c +++ b/ui/gtk/airpcap_gui_utils.c @@ -1569,7 +1569,7 @@ airpcap_add_key_to_list(GtkListStore *key_list_store, gchar* type, gchar* key, g void airpcap_fill_key_list(GtkListStore *key_list_store) { - const gchar* s = NULL; + gchar* s = NULL; unsigned int i,n; airpcap_if_info_t* fake_if_info; GList* wireshark_key_list = NULL; @@ -1597,16 +1597,23 @@ airpcap_fill_key_list(GtkListStore *key_list_store) else if (curr_key->type == AIRPDCAP_KEY_TYPE_WPA_PWD) { if (curr_key->ssid != NULL) - s = format_uri(curr_key->ssid, ":"); + { + s = format_uri(NULL, curr_key->ssid, ":"); + gtk_list_store_insert_with_values(key_list_store , &iter, G_MAXINT, + KL_COL_TYPE, AIRPCAP_WPA_PWD_KEY_STRING, + KL_COL_KEY, curr_key->key->str, + KL_COL_SSID, s, + -1); + wmem_free(NULL, s); + } else - s = ""; - + { gtk_list_store_insert_with_values(key_list_store , &iter, G_MAXINT, KL_COL_TYPE, AIRPCAP_WPA_PWD_KEY_STRING, KL_COL_KEY, curr_key->key->str, - KL_COL_SSID, s, + KL_COL_SSID, "", -1); - + } } else if (curr_key->type == AIRPDCAP_KEY_TYPE_WPA_PMK) { |