[libvirt] [PATCH] storage: fix unlikely memory leak in rbd backend

John Ferlan jferlan at redhat.com
Mon Mar 18 22:32:20 UTC 2013


On 03/18/2013 04:07 PM, Laine Stump wrote:
> 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 | 1 +
>  1 file changed, 1 insertion(+)
> 

ACK

Interesting only by upping the Coverity analysis level would this show
up in a coverity analysis (along with 400 more).

John




More information about the libvir-list mailing list