diff options
author | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-20 07:44:34 +0000 |
---|---|---|
committer | Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> | 2009-09-20 07:44:34 +0000 |
commit | 4d0d37ed6f99994d4959b9fbc7232d84948ac4ab (patch) | |
tree | d186af9c6adb430ea46ba7443db24d77e350e944 | |
parent | b809359c65b7b036efde5fabf75a9dedce34eb1c (diff) |
Use tvb_get_ephemeral_string() to avoid memleak.
svn path=/trunk/; revision=29990
-rw-r--r-- | epan/dissectors/packet-cops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-cops.c b/epan/dissectors/packet-cops.c index dd7ea976ab..c9a9d31a14 100644 --- a/epan/dissectors/packet-cops.c +++ b/epan/dissectors/packet-cops.c @@ -2523,7 +2523,7 @@ info_to_display(tvbuff_t *tvb, proto_item *stt, int offset, int octets, const ch /* Special section for printing strings */ if (mode==FMT_STR) { - codestr = tvb_get_string(tvb, offset, octets); + codestr = tvb_get_ephemeral_string(tvb, offset, octets); pi = proto_tree_add_string_format(stt, *hf_proto_parameter, tvb, offset, octets, codestr, "%-28s : %s", str, codestr); return pi; @@ -3233,7 +3233,7 @@ cops_classifier(tvbuff_t *tvb, proto_tree *st, guint n, guint32 offset, gboolean info_to_display(tvb,stt,offset,2,"ClassifierID",NULL,FMT_HEX,&hf_cops_pcmm_classifier_classifier_id); offset += 2; } - + /* Priority */ info_to_display(tvb,stt,offset,1,"Priority",NULL,FMT_HEX,&hf_cops_pcmm_classifier_priority); offset += 1; |