From 82380ce2c471e66a13da0b27c4822a402ac7c44a Mon Sep 17 00:00:00 2001 From: Gilbert Ramirez Date: Thu, 13 Dec 2001 05:49:13 +0000 Subject: Don't leak memory when closing a pppdump trace file. The second argument to g_ptr_array_free() does not indicate to glib to free the objects that the pointers in the GPtrArray refer to, but simply whether or not the free the block of pointers. We have to free the objects ourselves. svn path=/trunk/; revision=4391 --- wiretap/wtap-int.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'wiretap/wtap-int.h') diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index 2a7473600c..b52ee068e9 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -1,6 +1,6 @@ /* wtap-int.h * - * $Id: wtap-int.h,v 1.17 2001/12/04 08:26:00 guy Exp $ + * $Id: wtap-int.h,v 1.18 2001/12/13 05:49:13 gram Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez @@ -347,4 +347,9 @@ struct wtap_dumper { } \ G_STMT_END +/* glib doesn't have g_ptr_array_len of all things!*/ +#ifndef g_ptr_array_len +#define g_ptr_array_len(a) ((a)->len) +#endif + #endif /* __WTAP_INT_H__ */ -- cgit v1.2.3