]> git.ipfire.org Git - thirdparty/libvirt.git/commit
driver: fix handling of error return from finding resource
authorDaniel P. Berrangé <berrange@redhat.com>
Thu, 19 Apr 2018 14:25:01 +0000 (15:25 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 24 Apr 2018 16:00:49 +0000 (17:00 +0100)
commit2902b76472ce8fa29a5047426b1a3dad390b3b13
treedb9883957c2712b76238212e831935131d150ce5
parent96a72f344441ee45e69db14399f924d82bf73386
driver: fix handling of error return from finding resource

The virFileFindResource method merely builds up the expected fully
qualified path to the resource. It does not actually check if it exists
on disk. The loadable module callers were mistakenly thinking a NULL
indicates the file doesn't exist on disk, whereas it in fact indicates
an out of memory error.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/driver.c
src/storage/storage_backend.c
src/util/virfile.c