Memory management of tvb_uncompress() needs tvb_set_free_cb().
authorobiot <obiot@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 7 May 2004 18:15:24 +0000 (18:15 +0000)
committerobiot <obiot@f5534014-38df-0310-8fa8-9805f1628bb7>
Fri, 7 May 2004 18:15:24 +0000 (18:15 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10817 f5534014-38df-0310-8fa8-9805f1628bb7

epan/tvbuff.c

index c47c11ba2913ca2a433cdf7d21e52f4ea921777f..babc323d24f90ac4551ddc95b5d40edbd25a6505 100644 (file)
@@ -9,7 +9,7 @@
  *             the data of a backing tvbuff, or can be a composite of
  *             other tvbuffs.
  *
- * $Id: tvbuff.c,v 1.63 2004/05/06 17:40:52 obiot Exp $
+ * $Id: tvbuff.c,v 1.64 2004/05/07 18:15:24 obiot Exp $
  *
  * Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
  *
@@ -2380,6 +2380,7 @@ tvb_uncompress(tvbuff_t *tvb, int offset, int comprlen)
        if (uncompr != NULL) {
                uncompr_tvb =  tvb_new_real_data((guint8*) uncompr, bytes_out,
                    bytes_out);
+               tvb_set_free_cb(uncompr_tvb, g_free);
        }
        g_free(compr);
        return uncompr_tvb;