aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>1999-11-10 19:47:57 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>1999-11-10 19:47:57 +0000
commit02a64faea703a99bcf66581a0964580a5ed6b432 (patch)
tree872bb96fb606dc6b42e4951bda046b8947ee4cd9 /wiretap/wtap.c
parentaa5904b8791781d14dd197459e17428629ec8ddb (diff)
Fixed small memory leak in wiretap (frame_buffer wasn't being freed),
and aligned g_malloc calls with g_free calls (i.e, we no longer mix-and-match C-library malloc with GLIB g_free, and vice-versa). svn path=/trunk/; revision=1000
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r--wiretap/wtap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index 6954feb92b..6b8f219e9a 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -1,6 +1,6 @@
/* wtap.c
*
- * $Id: wtap.c,v 1.28 1999/11/06 10:31:45 guy Exp $
+ * $Id: wtap.c,v 1.29 1999/11/10 19:47:57 gram Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu>
@@ -204,6 +204,11 @@ void wtap_close(wtap *wth)
}
file_close(wth->fh);
+
+ if (wth->frame_buffer)
+ g_free(wth->frame_buffer);
+
+ g_free(wth);
}
int wtap_loop(wtap *wth, int count, wtap_handler callback, u_char* user,