diff options
author | Evan Huus <eapache@gmail.com> | 2021-08-27 13:10:00 -0400 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-08-29 11:38:25 +0000 |
commit | 7124525d24a7ff0540365e9561c01e0d9134d28c (patch) | |
tree | eae949719e98dfae3b2e8f09cb1a8c41142bd6ce /epan/guid-utils.c | |
parent | eaa2cf0c21d301854357734cff193d822648ebe2 (diff) |
epan: remove a few more uses of wmem_packet_scope
Diffstat (limited to 'epan/guid-utils.c')
-rw-r--r-- | epan/guid-utils.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/guid-utils.c b/epan/guid-utils.c index 2d0395e9a8..544697f5c7 100644 --- a/epan/guid-utils.c +++ b/epan/guid-utils.c @@ -39,8 +39,8 @@ ResolveWin32UUID(e_guid_t if_id, char *uuid_name, int uuid_name_max_len) DWORD uuid_max_size = MAX_PATH; TCHAR *reg_uuid_str; - reg_uuid_name=wmem_alloc(wmem_packet_scope(), (MAX_PATH*sizeof(TCHAR))+1); - reg_uuid_str=wmem_alloc(wmem_packet_scope(), (MAX_PATH*sizeof(TCHAR))+1); + reg_uuid_name=wmem_alloc(NULL, (MAX_PATH*sizeof(TCHAR))+1); + reg_uuid_str=wmem_alloc(NULL, (MAX_PATH*sizeof(TCHAR))+1); if(uuid_name_max_len < 2){ return 0; @@ -56,10 +56,14 @@ ResolveWin32UUID(e_guid_t if_id, char *uuid_name, int uuid_name_max_len) if (RegQueryValueEx(hKey, NULL, NULL, NULL, (LPBYTE)reg_uuid_name, &uuid_max_size) == ERROR_SUCCESS && uuid_max_size <= MAX_PATH) { g_snprintf(uuid_name, uuid_name_max_len, "%s", utf_16to8(reg_uuid_name)); RegCloseKey(hKey); + wmem_free(NULL, reg_uuid_name); + wmem_free(NULL, reg_uuid_str); return (int) strlen(uuid_name); } RegCloseKey(hKey); } + wmem_free(NULL, reg_uuid_name); + wmem_free(NULL, reg_uuid_str); return 0; /* we didn't find anything anyhow. Please don't use the string! */ } |