diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-08-26 06:20:50 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-08-26 06:20:50 +0000 |
commit | ae356ef145c26c64b1fd5594d8159376c963e6a0 (patch) | |
tree | b71f0856d81f4c8f314808f66661978c04532141 /proto.h | |
parent | 11b9a6e949183ec9601175c9d6e76408ccc685be (diff) | |
download | wireshark-ae356ef145c26c64b1fd5594d8159376c963e6a0.tar.gz wireshark-ae356ef145c26c64b1fd5594d8159376c963e6a0.tar.bz2 wireshark-ae356ef145c26c64b1fd5594d8159376c963e6a0.zip |
The dfilter yacc grammar now keeps track of every GNode that it allocates.
After a bad parse, instead of leaking this memory, the memory used for
those GNodes is now freed.
Added some memory-freeing "cleanup" routines for the dfilter and proto_tree
modules, which are called right before ethereal exits. Maybe once we get
a complete set of cleanup routines, we'll be able to better check if
memory is leaking.
svn path=/trunk/; revision=582
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* proto.h * Definitions for protocol display * - * $Id: proto.h,v 1.6 1999/08/14 01:26:39 gram Exp $ + * $Id: proto.h,v 1.7 1999/08/26 06:20:50 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -118,7 +118,12 @@ typedef struct proto_tree_search_info { const guint8 *packet_data; } proto_tree_search_info; +/* Sets up memory used by proto routines. Called at program startup */ void proto_init(void); + +/* Frees memory used by proto routines. Called at program shutdown */ +void proto_cleanup(void); + void proto_item_set_len(proto_item *ti, gint length); proto_tree* proto_tree_create_root(void); void proto_tree_free(proto_tree *tree); |