diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-03-22 16:33:39 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-03-22 16:33:39 +0000 |
commit | 8ca97915c38ec7d63df029e242ebc9d5bd7af32a (patch) | |
tree | af832821de43c3e20a4752ea3a4d42fb9987c56a /file.c | |
parent | 20c8fe0f7a749ccd1362b56166f01acdf3bc59f4 (diff) | |
download | wireshark-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.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -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 */ |