]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: fix unlikely memory leak in rbd backend
authorLaine Stump <laine@laine.org>
Mon, 18 Mar 2013 20:04:11 +0000 (16:04 -0400)
committerLaine Stump <laine@laine.org>
Tue, 19 Mar 2013 16:10:42 +0000 (12:10 -0400)
commit57f39e03ff4ee23e7b9bd1f4b90d7b6f965fa910
tree8dc99464280799b0850235249981409982014925
parent5ab0c045e3cbe858feed927c076daf43359732ce
storage: fix unlikely memory leak in rbd backend

virStorageBackendRBDRefreshPool() first allocates an array big enough
to hold 1024 names, then calls rbd_list(), which returns ERANGE if the
array isn't big enough. When that happens, the VIR_ALLOC_N is called
again with a larger size. Unfortunately, the original array isn't
freed before allocating a new one.
src/storage/storage_backend_rbd.c