diff options
author | Evan Huus <eapache@gmail.com> | 2013-07-06 21:55:10 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-07-06 21:55:10 +0000 |
commit | 337ad423c1a832d3c6d189fbbf9f8760023d5abc (patch) | |
tree | 39decca612b3f07ebce7dbff62839f1c2a319615 /ui/cli/tap-iostat.c | |
parent | 67e4c15d4eb9d2b458d7a69bf1fa6e20dd757583 (diff) | |
download | wireshark-337ad423c1a832d3c6d189fbbf9f8760023d5abc.tar.gz |
From Peter Hatina via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8888
We're allocating an array of pointers, not an array of objects, so make the
sizeof() reflect that to avoid over-allocating.
svn path=/trunk/; revision=50423
Diffstat (limited to 'ui/cli/tap-iostat.c')
-rw-r--r-- | ui/cli/tap-iostat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c index 019ae26ea7..62819f17a9 100644 --- a/ui/cli/tap-iostat.c +++ b/ui/cli/tap-iostat.c @@ -927,7 +927,7 @@ iostat_draw(void *arg) num_rows = (int)(duration/interval) + (((duration%interval+500000)/1000000) > 0 ? 1 : 0); /* Load item_in_column with the first item in each column */ - item_in_column = (io_stat_item_t **) g_malloc(sizeof(io_stat_item_t) * num_cols); + item_in_column = (io_stat_item_t **) g_malloc(sizeof(io_stat_item_t *) * num_cols); for (j=0; j<num_cols; j++) { item_in_column[j] = stat_cols[j]; } |