aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index 7ad30ec37f..b20c34f25f 100644
--- a/file.c
+++ b/file.c
@@ -2562,8 +2562,8 @@ cf_print_packets(capture_file *cf, print_args_t *print_args,
width of the title and the width of the data - and construct
a buffer with a line containing the column titles. */
callback_args.num_visible_cols = num_visible_col;
- callback_args.col_widths = (gint *) g_malloc(sizeof(gint) * num_visible_col);
- callback_args.visible_cols = (gint *) g_malloc(sizeof(gint) * num_visible_col);
+ callback_args.col_widths = g_new(gint, num_visible_col);
+ callback_args.visible_cols = g_new(gint, num_visible_col);
cp = &callback_args.header_line_buf[0];
line_len = 0;
visible_col_count = 0;