aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcm.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-07-28 09:47:28 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-07-28 09:47:28 +0000
commit0d7a2abbc76409c342cc283ece9f2947aec643b7 (patch)
tree5400640b4e3e95fc3a1c8358828d8afab3a004f0 /epan/dissectors/packet-dcm.c
parent7035a45c8f7787ae3a4fed454f08589dea6abb20 (diff)
some more memification of tvb_get_string() no obvious memleaks fixed this time :-(
svn path=/trunk/; revision=15131
Diffstat (limited to 'epan/dissectors/packet-dcm.c')
-rw-r--r--epan/dissectors/packet-dcm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dcm.c b/epan/dissectors/packet-dcm.c
index a9bb64c91e..b9460daf19 100644
--- a/epan/dissectors/packet-dcm.c
+++ b/epan/dissectors/packet-dcm.c
@@ -492,7 +492,7 @@ dcm_setSyntax(dcmItem_t *di, char *name)
if (di->xfer != dcm_xfer_unk)
g_free(di->xfer); /* free prev allocated xfer */
di->syntax = 0;
- di->xfer = name;
+ di->xfer = g_strdup(name);
if (0 == *name) return;
/* this would be faster to skip the common parts, and have a FSA to
* find the syntax.
@@ -660,8 +660,7 @@ dissect_dcm_assoc(dcmState_t *dcm_data, proto_item *ti, tvbuff_t *tvb, int offse
if (ti)
proto_tree_add_item(dcm_tree, hf_dcm_pdi_syntax, tvb, offset, len > 65 ? 65 : len, FALSE);
if (reply && di && di->valid) {
- /* setSyntax now free's existing name, if being reset */
- name = tvb_get_string(tvb, offset, len);
+ name = ep_tvb_get_string(tvb, offset, len);
dcm_setSyntax(di, name);
}
reply = 0;