diff options
author | Michael Mann <mmann78@netscape.net> | 2016-05-10 16:04:14 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-05-10 22:49:08 +0000 |
commit | 1dccd1ee072722fbe6d5e1a9d726a7e87d191f76 (patch) | |
tree | 4d4059e0eead7303c6d7420a3828332d26bd79fa /plugins | |
parent | 931603c4b84a5e69e94e3bfd3c84332e664062ab (diff) | |
download | wireshark-1dccd1ee072722fbe6d5e1a9d726a7e87d191f76.tar.gz wireshark-1dccd1ee072722fbe6d5e1a9d726a7e87d191f76.tar.bz2 wireshark-1dccd1ee072722fbe6d5e1a9d726a7e87d191f76.zip |
Have fvalue_to_string_repr always return an (wmem) allocated buffer.
Previous patches converted all fvalue_to_string_repr calls to expect
an allocated buffer (and not a passed in one). Now changing signature
to force an allocated buffer. Added wmem in case that can be taken
advantage of within epan (and since the function signature was changing
anyway).
Change-Id: Ica1ac4a9a182ce0e73303856329e198d9d525b7b
Reviewed-on: https://code.wireshark.org/review/15343
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mate/mate_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mate/mate_util.c b/plugins/mate/mate_util.c index 169eaae727..828e1ac118 100644 --- a/plugins/mate/mate_util.c +++ b/plugins/mate/mate_util.c @@ -313,11 +313,11 @@ extern AVP* new_avp_from_finfo(const gchar* name, field_info* finfo) { new_avp_val->n = scs_subscribe(avp_strings, name); - repr = fvalue_to_string_repr(&finfo->value,FTREPR_DISPLAY,finfo->hfinfo->display,NULL); + repr = fvalue_to_string_repr(NULL, &finfo->value,FTREPR_DISPLAY,finfo->hfinfo->display); if (repr) { value = scs_subscribe(avp_strings, repr); - g_free(repr); + wmem_free(NULL, repr); #ifdef _AVP_DEBUGGING dbg_print (dbg_avp,2,dbg_fp,"new_avp_from_finfo: from string: %s",value); #endif |