Skip to content

Commit

Permalink
ahci-test: fix opts leak of skip tests
Browse files Browse the repository at this point in the history
Fixes the following ASAN report:

Direct leak of 128 byte(s) in 8 object(s) allocated from:
    #0 0x7fefce311850 in malloc (/lib64/libasan.so.4+0xde850)
    #1 0x7fefcdd5ef0c in g_malloc ../glib/gmem.c:94
    #2 0x559b976faff0 in create_ahci_io_test /home/elmarco/src/qemu/tests/ahci-test.c:1810

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180215212552.26997-6-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
elmarco authored and bonzini committed Mar 6, 2018
1 parent 80818e9 commit 0fd76bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/ahci-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,7 @@ static void create_ahci_io_test(enum IOMode type, enum AddrMode addr,
if ((addr == ADDR_MODE_LBA48) && (offset == OFFSET_HIGH) &&
(mb_to_sectors(test_image_size_mb) <= 0xFFFFFFF)) {
g_test_message("%s: skipped; test image too small", name);
g_free(opts);
g_free(name);
return;
}
Expand Down

0 comments on commit 0fd76bc

Please sign in to comment.