qdist: use g_renew and g_new instead of g_realloc and g_malloc.
commit071d4054770205ddb8a58a9e2735069d8fe52af1
authorEmilio G. Cota <cota@braap.org>
Mon, 25 Jul 2016 15:03:44 +0000 (25 11:03 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 3 Aug 2016 16:42:35 +0000 (3 18:42 +0200)
tree3004d8291f4f13c857327005942d7908123652e4
parentf9dbc19e8bf58d0cbc830083352475bb16f315c4
qdist: use g_renew and g_new instead of g_realloc and g_malloc.

This is safer against overflow.  g_renew is available in all
version of glib, while g_realloc_n is only available in 2.24.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Message-Id: <1469459025-23606-3-git-send-email-cota@braap.org>
[Rewritten to use g_new/g_renew. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
util/qdist.c