aboutsummaryrefslogtreecommitdiffstats
path: root/epan/print.c
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2019-01-23 09:10:18 +0100
committerDario Lombardo <lomato@gmail.com>2019-01-23 10:14:13 +0000
commit1e1c7618427e7006b74dadc1ac26f1716e442cd0 (patch)
treedf185c19e3d8882391bac693dcbc4c37d3b7e578 /epan/print.c
parent8ab0932aa18b65fb8717ac583b1fd20be56074e4 (diff)
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>
Diffstat (limited to 'epan/print.c')
-rw-r--r--epan/print.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/print.c b/epan/print.c
index ad99f42168..fd0a8221ee 100644
--- a/epan/print.c
+++ b/epan/print.c
@@ -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;