]> Git Repo - qemu.git/commitdiff
test-replication: fix leaks
authorMarc-André Lureau <[email protected]>
Wed, 9 Nov 2016 10:45:47 +0000 (14:45 +0400)
committerStefan Hajnoczi <[email protected]>
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 <[email protected]>
Message-id: 20161109104547[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
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);
 }
 
 /*
This page took 0.026385 seconds and 4 git commands to generate.