From: Jim Meyering <meyer...@redhat.com>

Signed-off-by: Jim Meyering <meyer...@redhat.com>
---
 block/qcow2.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/block/qcow2.c b/block/qcow2.c
index 655799c..f3388bf 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -919,6 +919,7 @@ int qcow2_update_header(BlockDriverState *bs)
         ret = sizeof(*header);
         break;
     default:
+        free(buf);
         return -EINVAL;
     }

-- 
1.7.10.2.520.g6a4a482


Reply via email to