print: fix memleak in ek output.

Memleak found & fixed by Shinya Sasaki.

Bug: 15406
Change-Id: I2d982a7876c1cd595cabe18ee0dc00db576a5837
Reviewed-on: https://code.wireshark.org/review/31669
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
This commit is contained in:
Dario Lombardo 2019-01-23 09:10:18 +01:00
parent 8ab0932aa1
commit 1e1c761842
1 changed files with 2 additions and 1 deletions

View File

@ -1414,7 +1414,8 @@ proto_tree_write_node_ek(proto_node *node, write_json_data *pdata)
g_hash_table_destroy(attr_table);
// Print attributes
GSList *current_attr = g_slist_reverse(attr_list);
attr_list = g_slist_reverse(attr_list);
GSList *current_attr = attr_list;
while (current_attr != NULL) {
GSList *attr_instances = (GSList *) current_attr->data;