diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2001-11-02 21:39:34 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2001-11-02 21:39:34 +0000 |
commit | 920b294065d33dd32e1f024d2b936abf0764fc98 (patch) | |
tree | 0f1262ac30ea1d7401942578cd0ecd7b87c6c4e6 /epan/tvbuff.c | |
parent | 257d8398d158721587f5da48aa019c59a6df8226 (diff) |
Fix leak of ds_name. Thanks to Sirop Erable <matrix_ottawa@yahoo.ca>
svn path=/trunk/; revision=4128
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r-- | epan/tvbuff.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c index c3f7f23d45..25b166b3ba 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -9,7 +9,7 @@ * the data of a backing tvbuff, or can be a composite of * other tvbuffs. * - * $Id: tvbuff.c,v 1.20 2001/10/29 21:56:48 guy Exp $ + * $Id: tvbuff.c,v 1.21 2001/11/02 21:39:34 gram Exp $ * * Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org> * @@ -143,6 +143,7 @@ tvb_init(tvbuff_t *tvb, tvbuff_type type) tvb->real_data = NULL; tvb->raw_offset = -1; tvb->used_in = NULL; + tvb->ds_name = NULL; switch(type) { case TVBUFF_REAL_DATA: @@ -236,6 +237,10 @@ tvb_free(tvbuff_t* tvb) g_slist_free(tvb->used_in); } + if (tvb->ds_name) { + g_free(tvb->ds_name); + } + g_chunk_free(tvb, tvbuff_mem_chunk); } } |