summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-03-22 16:33:39 +0000
committerGuy Harris <guy@alum.mit.edu>2011-03-22 16:33:39 +0000
commit8ca97915c38ec7d63df029e242ebc9d5bd7af32a (patch)
treeaf832821de43c3e20a4752ea3a4d42fb9987c56a /file.c
parent20c8fe0f7a749ccd1362b56166f01acdf3bc59f4 (diff)
downloadwireshark-8ca97915c38ec7d63df029e242ebc9d5bd7af32a.tar.gz
We have to initialize the elements of the fdata->col_text array to null
pointers, as there's code that assumes that if they're not set to null pointers, they're set correctly, and doesn't bother setting them to the right value. svn path=/trunk/; revision=36252
Diffstat (limited to 'file.c')
-rw-r--r--file.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/file.c b/file.c
index 2bb43bd71e..37d177aa42 100644
--- a/file.c
+++ b/file.c
@@ -1160,19 +1160,12 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
/*
* Initialize the col_text and col_text_len arrays.
- * We allocate them, and initialize them to point to a bunch of null
- * strings, so that if the columns don't all get set to valid values,
- * they are empty.
*/
static void
init_col_text(frame_data *fdata, gint num_cols)
{
- gint i;
-
fdata->col_text_len = se_alloc0(sizeof(fdata->col_text_len) * num_cols);
- fdata->col_text = se_alloc(sizeof(fdata->col_text) * num_cols);
- for (i = 0; i < num_cols; i++)
- fdata->col_text[i] = "";
+ fdata->col_text = se_alloc0(sizeof(fdata->col_text) * num_cols);
}
/* read in a new packet */