commit | 02004bd4ba1ace29812e977d3cd0bc20fd6bf677 | [log] [tgz] |
---|---|---|
author | Max Reitz <mreitz@redhat.com> | Mon Aug 18 22:07:32 2014 +0200 |
committer | Kevin Wolf <kwolf@redhat.com> | Wed Aug 20 11:51:28 2014 +0200 |
tree | 8053459e03f6ad6918978c46ae24900242dac874 | |
parent | 440ba08aea3d841996efaf6a6b88426b0d59abf4 [diff] |
qcow2: Use g_try_new0() for cache array With a variable cache size, the number given to qcow2_cache_create() may be huge. Therefore, use g_try_new0(). While at it, use g_new0() instead of g_malloc0() for allocating the Qcow2Cache object. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>