X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Ftools%2Fg2%2Fevents.c;h=6839a435aebb57067529b2634a630d6218fb30fc;hb=64f7530fff5d8811894c75fc3378a5c6da77d7b8;hp=d4333bb05d1a4cc8d3e396a2fcc0fcc249546dcb;hpb=7cd468a3d7dee7d6c92f69a0bb7061ae208ec727;p=vpp.git diff --git a/src/tools/g2/events.c b/src/tools/g2/events.c index d4333bb05d1..6839a435aeb 100644 --- a/src/tools/g2/events.c +++ b/src/tools/g2/events.c @@ -142,7 +142,7 @@ static void make_sorted_pid_vector(void) pid_sort_t *psp; int i; - psp = g_pids = g_malloc(sizeof(pid_sort_t)*g_npids); + psp = g_pids = g_malloc0(sizeof(pid_sort_t)*g_npids); for (i = 0; i < PIDHASH_NBUCKETS; i++) { pp = s_pidhash[i]; @@ -191,7 +191,7 @@ static void make_sorted_pid_vector(void) * toggle between "chase" mode, snapshots, and the original * display method on short notice */ - g_original_pids = g_malloc(sizeof(pid_sort_t)*g_npids); + g_original_pids = g_malloc0(sizeof(pid_sort_t)*g_npids); memcpy (g_original_pids, g_pids, sizeof(pid_sort_t)*g_npids); }