diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-08-31 07:42:31 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-08-31 07:42:44 +0000 |
commit | 5fea2b5f4198f1a36f313ef38532ddffd02ac5b1 (patch) | |
tree | 29d44f8569f4c4d17c93e38a5e309ab6d9f7e347 /epan/dissectors/packet-diameter.c | |
parent | c8869f68db6cd1d4a341d57600ecf22627632c9f (diff) |
Revert "diameter: fix 400kb leaked memory on exit"
This reverts commit a04b6fcb3db901734ed948134c973996786be8b7.
Temporary revert to see if this prevents the "tshark -G" crashes being seen on the 64-bit Windows buildbot.
Change-Id: I561439039ca2667b72d7e2319a6f3f5f97e18d15
Reviewed-on: https://code.wireshark.org/review/17412
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-diameter.c')
-rw-r--r-- | epan/dissectors/packet-diameter.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/epan/dissectors/packet-diameter.c b/epan/dissectors/packet-diameter.c index 58adcfb8c3..488e850bd0 100644 --- a/epan/dissectors/packet-diameter.c +++ b/epan/dissectors/packet-diameter.c @@ -681,7 +681,7 @@ dissect_diameter_avp(diam_ctx_t *c, tvbuff_t *tvb, int offset, diam_sub_dis_t *d wmem_array_sort(vendor->vs_avps, compare_avps); vendor->vs_avps_ext = value_string_ext_new(VND_AVP_VS(vendor), VND_AVP_VS_LEN(vendor)+1, - wmem_strdup_printf(wmem_epan_scope(), "diameter_vendor_%s", + g_strdup_printf("diameter_vendor_%s", val_to_str_ext_const(vendorid, &sminmpec_values_ext, "Unknown"))); @@ -1847,14 +1847,6 @@ strcase_equal(gconstpointer ka, gconstpointer kb) return g_ascii_strcasecmp(a,b) == 0; } -static gboolean -ddict_cleanup_cb(wmem_allocator_t* allocator _U_, wmem_cb_event_t event _U_, void *user_data) -{ - ddict_t *d = (ddict_t *)user_data; - ddict_free(d); - return FALSE; -} - /* Note: Dynamic "value string arrays" (e.g., vs_cmds, vs_avps, ...) are constructed using */ /* "zero-terminated" GArrays so that they will have the same form as standard */ @@ -1913,6 +1905,7 @@ dictionary_load(void) /* load the dictionary */ dir = wmem_strdup_printf(NULL, "%s" G_DIR_SEPARATOR_S "diameter" G_DIR_SEPARATOR_S, get_datafile_dir()); + /* XXX We don't call ddict_free anywhere. */ d = ddict_scan(dir,"dictionary.xml",do_debug_parser); wmem_free(NULL, dir); if (d == NULL) { @@ -1920,7 +1913,6 @@ dictionary_load(void) g_array_free(vnd_shrt_arr, TRUE); return 0; } - wmem_register_callback(wmem_epan_scope(), ddict_cleanup_cb, d); if (do_dump_dict) ddict_print(stdout, d); |