[libvirt] [libvirt-sandbox][PATCH 2/4] libvirt-sandbox-init-common: Avoid calling fclose(NULL)
Daniel P. Berrange
berrange at redhat.com
Wed Sep 23 09:19:13 UTC 2015
On Wed, Sep 23, 2015 at 11:15:22AM +0200, Michal Privoznik wrote:
> The problem occurs in setup_disk_tags. Imagine that fopen()
> called at the beginning of the function fails. This results in
> jumping onto the 'cleanup' label where fclose() is called.
> However, at this point @fp is NULL. And fclose() does not like
> that.
>
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> libvirt-sandbox/libvirt-sandbox-init-common.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
ACK
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list