]> git.ipfire.org Git - thirdparty/libvirt.git/commit
netcf: Don't complain when cleanup is called before init
authorChristophe Fergeau <cfergeau@redhat.com>
Thu, 17 Oct 2013 13:48:33 +0000 (15:48 +0200)
committerChristophe Fergeau <cfergeau@redhat.com>
Fri, 18 Oct 2013 12:31:51 +0000 (14:31 +0200)
commit68eb3709a1fc6f1965173aceba4b16f50cdec9e5
tree2b9574e1f4a02d1f94fb6c96b0eabc3f06917f8a
parent9712c2510ec87a87578576a407768380e250a6a4
netcf: Don't complain when cleanup is called before init

netcfStateInitialize() initializes the driverState variable,
and when netcfStateCleanup is called, it will call virReportError()
if driverState is NULL.
This is not consistent with what other state objects are doing,
they return -1 without reporting an error in such cases.

See also
https://www.redhat.com/archives/libvir-list/2013-October/msg00809.html:

On Thu, Oct 17, 2013 at 01:40:19PM +0100, Daniel P. Berrange wrote:
> We don't want virStateCleanup to skip execution if virStateInitialize
> has failed though - every callback in virStateCleanup should be written
> to be safe if its corresponding init function hasn't run.
src/interface/interface_backend_netcf.c