]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: Fix error path in virStorageBackendSheepdogRefreshVol
authorJohn Ferlan <jferlan@redhat.com>
Tue, 12 Feb 2019 11:30:35 +0000 (06:30 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 12 Feb 2019 13:51:23 +0000 (08:51 -0500)
commit8a69cbc1813c7fd716ce1d6c146136fa36083aaf
treee3d8a2777b4fcd17a933ace988df03b1d27642d7
parent755048003644aeeec540cdb73bc25d09fbff8723
storage: Fix error path in virStorageBackendSheepdogRefreshVol

If the virAsprintf of the vol->key fails, then we would erroneously
return the '0' from the @ret from virStorageBackendSheepdogParseVdiList.
So in this error path case, let's set ret = -1.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/storage/storage_backend_sheepdog.c