]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
test-replication: fix leaks
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 9 Nov 2016 10:45:47 +0000 (14:45 +0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 15 Nov 2016 15:41:00 +0000 (15:41 +0000)
ASAN spotted:
SUMMARY: AddressSanitizer: 301990288 byte(s) leaked in 33 allocation(s).

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20161109104547.23861-1-marcandre.lureau@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/test-replication.c

index 0997bd8b74f785b0708cb67a3e5266fdd585512a..fac2da3f588b6a328921dff996dec0a0c8e9db56 100644 (file)
@@ -85,6 +85,8 @@ static void test_blk_read(BlockBackend *blk, long pattern,
     }
 
     g_free(pattern_buf);
+    g_free(cmp_buf);
+    qemu_iovec_destroy(&qiov);
 }
 
 static void test_blk_write(BlockBackend *blk, long pattern, int64_t offset,
@@ -116,6 +118,7 @@ static void test_blk_write(BlockBackend *blk, long pattern, int64_t offset,
     }
 
     g_free(pattern_buf);
+    qemu_iovec_destroy(&qiov);
 }
 
 /*