qcow2: Use g_try_realloc() in qcow2_expand_zero_clusters()
commitde7269d293bc3a7fba98a0f12781eccb4ea4be1e
authorAlberto Garcia <berto@igalia.com>
Fri, 9 Feb 2018 14:42:22 +0000 (9 16:42 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 13 Feb 2018 11:27:17 +0000 (13 12:27 +0100)
treecea4e153a80df9187352f738ec720503adde5fb0
parentc1a4b6f9246bf2841b14b11d4c5a029429f0659a
qcow2: Use g_try_realloc() in qcow2_expand_zero_clusters()

g_realloc() aborts the program if it fails to allocate the required
amount of memory. We want to detect that scenario and return an error
instead, so let's use g_try_realloc().

Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cluster.c