summaryrefslogtreecommitdiff
path: root/epan/tvbuff.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-01-05 10:19:36 +0000
committerGuy Harris <guy@alum.mit.edu>2005-01-05 10:19:36 +0000
commit5474a467a29d42aef3928a2d7771485e95828966 (patch)
tree0dc94f726a00016cb6707388cf01eab4610d41a1 /epan/tvbuff.c
parentdb204c70456a495877d43b1799ee5185b7c2bef5 (diff)
downloadwireshark-5474a467a29d42aef3928a2d7771485e95828966.tar.gz
From Chris Maynard: free up the z_stream we've allocated before failure
returns. (The error returns shouldn't happen in practice, as the GLib memory allocators never return a null pointer, they just abort the program, but if we're going to be checking for failure and returning, we should do the right thing anyway.) svn path=/trunk/; revision=12957
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r--epan/tvbuff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index 7443859d97..11e029106b 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -2228,6 +2228,7 @@ tvb_uncompress(tvbuff_t *tvb, int offset, int comprlen)
compr = tvb_memdup(tvb, offset, comprlen);
if (!compr) {
+ g_free(strm);
return NULL;
}
@@ -2257,6 +2258,7 @@ tvb_uncompress(tvbuff_t *tvb, int offset, int comprlen)
if(strmbuf == NULL) {
g_free(compr);
+ g_free(strm);
return NULL;
}