aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-6lowpan.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-07-06 18:40:56 +0000
committerEvan Huus <eapache@gmail.com>2013-07-06 18:40:56 +0000
commitbd52515b0684f259fae430b595d0a8dd72dab572 (patch)
tree08b9fbad06e07b704d17fcb298d358dff42ebd05 /epan/dissectors/packet-6lowpan.c
parent2626f96901887e24010106f9f6de33c1c46287c3 (diff)
Use epan-scoped memory for 6lowpan preference names. Another ~300 bytes gone.
svn path=/trunk/; revision=50417
Diffstat (limited to 'epan/dissectors/packet-6lowpan.c')
-rw-r--r--epan/dissectors/packet-6lowpan.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c
index bb439fab45..4dff2c0c30 100644
--- a/epan/dissectors/packet-6lowpan.c
+++ b/epan/dissectors/packet-6lowpan.c
@@ -2767,12 +2767,10 @@ proto_register_6lowpan(void)
/*
* Inspired by the IEEE 802.11 dissector - the preferences are expecting
* that each pref has a unique string passed in, and will crash if we
- * try to reuse any for multiple preferences. Allocate them off the heap
- * and leave them allocated. OMG, an intentional memory leak; I must be
- * an evil developer. Good thing we have MMU's in this day and age.
+ * try to reuse any for multiple preferences.
*/
- pref_name = g_strdup_printf("context%d", i);
- pref_title = g_strdup_printf("Context %d", i);
+ pref_name = wmem_strdup_printf(wmem_epan_scope(), "context%d", i);
+ pref_title = wmem_strdup_printf(wmem_epan_scope(), "Context %d", i);
prefs_register_string_preference(prefs_module, pref_name, pref_title,
"IPv6 prefix to use for stateful address decompression.",
&lowpan_context_prefs[i]);