aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ntlmssp.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-04-21 19:12:26 +0200
committerAnders Broman <a.broman58@gmail.com>2016-04-22 04:32:32 +0000
commit9abbf8b69d830bff29705991d6ebb760ec2f4454 (patch)
tree7a75eda3bf85ae8846511215c4c0ef0a42ca1940 /epan/dissectors/packet-ntlmssp.c
parent9de18e88f501ef953395b8cadf9dbc9b79ce40cc (diff)
Do not mix wmem and glib allocators
Change-Id: I0e845668a1b9dbec93ea920a8585ecfe60f001d1 Reviewed-on: https://code.wireshark.org/review/15044 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ntlmssp.c')
-rw-r--r--epan/dissectors/packet-ntlmssp.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c
index aa24bf73e9..5ce7f3d63d 100644
--- a/epan/dissectors/packet-ntlmssp.c
+++ b/epan/dissectors/packet-ntlmssp.c
@@ -2047,7 +2047,7 @@ decrypt_data_payload(tvbuff_t *tvb, int offset, guint32 encrypted_block_length,
/* Store the decrypted contents in the packet state struct
(of course at this point, they aren't decrypted yet) */
- packet_ntlmssp_info->decrypted_payload = (guint8 *)tvb_memdup(NULL, tvb, offset,
+ packet_ntlmssp_info->decrypted_payload = (guint8 *)tvb_memdup(wmem_file_scope(), tvb, offset,
encrypted_block_length);
packet_ntlmssp_info->payload_len = encrypted_block_length;
decrypted_payloads = g_slist_prepend(decrypted_payloads,
@@ -2541,7 +2541,7 @@ dissect_ntlmssp_encrypted_payload(tvbuff_t *data_tvb,
/* Store the decrypted contents in the packet state struct
(of course at this point, they aren't decrypted yet) */
- packet_ntlmssp_info->decrypted_payload = tvb_memdup(NULL, data_tvb, offset,
+ packet_ntlmssp_info->decrypted_payload = tvb_memdup(wmem_file_scope(), data_tvb, offset,
encrypted_block_length);
decrypted_payloads = g_slist_prepend(decrypted_payloads,
packet_ntlmssp_info->decrypted_payload);
@@ -2569,12 +2569,6 @@ dissect_ntlmssp_encrypted_payload(tvbuff_t *data_tvb,
}
#endif
-static void
-free_payload(gpointer decrypted_payload, gpointer user_data _U_)
-{
- g_free(decrypted_payload);
-}
-
static guint
header_hash(gconstpointer pointer)
{
@@ -2604,7 +2598,6 @@ static void
ntlmssp_cleanup_protocol(void)
{
if (decrypted_payloads != NULL) {
- g_slist_foreach(decrypted_payloads, free_payload, NULL);
g_slist_free(decrypted_payloads);
decrypted_payloads = NULL;
}