]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: Need to initialize 'zerobuf'
authorJohn Ferlan <jferlan@redhat.com>
Tue, 22 Jan 2013 14:15:46 +0000 (09:15 -0500)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 22 Jan 2013 16:29:26 +0000 (17:29 +0100)
It was possible to call VIR_FREE in cleanup prior to initialization.

src/storage/storage_backend.c

index c2c4c5111fd1f0cdcd911e61eaf691fd1c98f3e0..cab72c63cc9a30d5f51a1bc4ec9a37fadc05933b 100644 (file)
@@ -141,7 +141,7 @@ virStorageBackendCopyToFD(virStorageVolDefPtr vol,
     size_t rbytes = READ_BLOCK_SIZE_DEFAULT;
     size_t wbytes = 0;
     int interval;
-    char *zerobuf;
+    char *zerobuf = NULL;
     char *buf = NULL;
     struct stat st;