diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-07-28 09:47:28 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2005-07-28 09:47:28 +0000 |
commit | 0d7a2abbc76409c342cc283ece9f2947aec643b7 (patch) | |
tree | 5400640b4e3e95fc3a1c8358828d8afab3a004f0 /epan/dissectors/packet-image-gif.c | |
parent | 7035a45c8f7787ae3a4fed454f08589dea6abb20 (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-image-gif.c')
-rw-r--r-- | epan/dissectors/packet-image-gif.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/epan/dissectors/packet-image-gif.c b/epan/dissectors/packet-image-gif.c index 9fec930740..4eefe72635 100644 --- a/epan/dissectors/packet-image-gif.c +++ b/epan/dissectors/packet-image-gif.c @@ -168,7 +168,7 @@ dissect_gif(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) guint8 color_resolution; guint8 image_bpp; guint tvb_len = tvb_reported_length(tvb); - char *str = tvb_get_string(tvb, 0, 6); + char *str = ep_tvb_get_string(tvb, 0, 6); guint8 version; /* Check whether we're processing a GIF object */ @@ -181,7 +181,6 @@ dissect_gif(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) } else { /* Not a GIF image! */ version = GIF_ERROR; - g_free(str); return; } /* Add summary to INFO column if it is enabled */ @@ -196,7 +195,6 @@ dissect_gif(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) if (tree) { ti = proto_tree_add_item(tree, proto_gif, tvb, 0, -1, TRUE); proto_item_append_text(ti, ", Version: %s", str); - g_free(str); gif_tree = proto_item_add_subtree(ti, ett_gif); /* GIF signature */ ti = proto_tree_add_item(gif_tree, hf_version, tvb, 0, 6, TRUE); @@ -440,8 +438,6 @@ dissect_gif(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) } } /* while */ } - else - g_free(str); } |