aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-k12.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-01-10 19:04:06 -0500
committerMichael Mann <mmann78@netscape.net>2015-01-11 00:27:57 +0000
commitf5c4d06dbaf2c8468588e0b35e386045c1107ea4 (patch)
tree8806d34bf32d34bc7c14c53cbdcd9d0720ac05b1 /epan/dissectors/packet-k12.c
parentfdd6554ccd1b01554865323045033db9ca858f97 (diff)
Replace some "low hanging fruit" uses of emem.
Most of the remaining ep_ uses are grouped with specific functionality. Change-Id: I8fa64a17acc6bcdcf6891b2d28715ac0c58f1a4a Reviewed-on: https://code.wireshark.org/review/6484 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-k12.c')
-rw-r--r--epan/dissectors/packet-k12.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-k12.c b/epan/dissectors/packet-k12.c
index 6d7f4159ed..426bf0ff03 100644
--- a/epan/dissectors/packet-k12.c
+++ b/epan/dissectors/packet-k12.c
@@ -359,7 +359,7 @@ static gboolean
protos_chk_cb(void* r _U_, const char* p, guint len, const void* u1 _U_, const void* u2 _U_, const char** err)
{
gchar** protos;
- gchar* line = ep_strndup(p,len);
+ gchar* line = wmem_strndup(NULL,p,len);
guint num_protos, i;
g_strstrip(line);
@@ -372,6 +372,7 @@ protos_chk_cb(void* r _U_, const char* p, guint len, const void* u1 _U_, const v
if (!num_protos) {
*err = ep_strdup_printf("No protocols given");
+ wmem_free(NULL, line);
wmem_free(NULL, protos);
return FALSE;
}
@@ -379,11 +380,13 @@ protos_chk_cb(void* r _U_, const char* p, guint len, const void* u1 _U_, const v
for (i = 0; i < num_protos; i++) {
if (!find_dissector(protos[i])) {
*err = ep_strdup_printf("Could not find dissector for: '%s'",protos[i]);
+ wmem_free(NULL, line);
wmem_free(NULL, protos);
return FALSE;
}
}
+ wmem_free(NULL, line);
wmem_free(NULL, protos);
return TRUE;
}