From 9d4d1a579493fbe0ab889cd7583148cd1d549720 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 8 Oct 2012 17:04:37 +0000 Subject: col_cleanup() is undoing the allocations that col_init() does, so it's freeing the allocated array of pointers, not what the pointers ported to, so it should free col_data. Note that it does that, and put it after col_init() in the source file and header file. Put in a comment explaining the MSVC bug that we're working around with the casts. svn path=/trunk/; revision=45393 --- epan/column-utils.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'epan/column-utils.h') diff --git a/epan/column-utils.h b/epan/column-utils.h index 891d1cf2f8..9efcd6cf9f 100644 --- a/epan/column-utils.h +++ b/epan/column-utils.h @@ -39,18 +39,19 @@ extern "C" { * Helper routines for column utility structures and routines. */ -/** Cleanup all the data structures for constructing column data +/** Allocate all the data structures for constructing column data, given + * the number of columns. * * Internal, don't use this in dissectors! */ -extern void col_cleanup(column_info *cinfo); +extern void col_setup(column_info *cinfo, const gint num_cols); -/** Allocate all the data structures for constructing column data, given - * the number of columns. +/** Cleanup all the data structures for constructing column data; + * undoes the alocations that col_setup() does. * * Internal, don't use this in dissectors! */ -extern void col_setup(column_info *cinfo, const gint num_cols); +extern void col_cleanup(column_info *cinfo); /** Initialize the data structures for constructing column data. * -- cgit v1.2.1