summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2016-01-11 14:10:42 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:23 -0600
commit5920d943245046ff38f9223ca573904c1b023408 (patch)
tree21c09826fcdb23822e8ecdcba38ab7a8154221b3 /tests
parent88f13db4a7fa26f35289c3b9003fa14d27db31b4 (diff)
downloadhqemu-5920d943245046ff38f9223ca573904c1b023408.zip
hqemu-5920d943245046ff38f9223ca573904c1b023408.tar.gz
ahci-test: fix memory leak
Use the proper free command to detroy an AHCICommand. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1452282920-21550-2-git-send-email-jsnow@redhat.com
Diffstat (limited to 'tests')
-rw-r--r--tests/ahci-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ahci-test.c b/tests/ahci-test.c
index 0888506..f4945dc 100644
--- a/tests/ahci-test.c
+++ b/tests/ahci-test.c
@@ -1045,14 +1045,14 @@ static void test_dma_fragmented(void)
ahci_command_commit(ahci, cmd, px);
ahci_command_issue(ahci, cmd);
ahci_command_verify(ahci, cmd);
- g_free(cmd);
+ ahci_command_free(cmd);
cmd = ahci_command_create(CMD_READ_DMA);
ahci_command_adjust(cmd, 0, ptr, bufsize, 32);
ahci_command_commit(ahci, cmd, px);
ahci_command_issue(ahci, cmd);
ahci_command_verify(ahci, cmd);
- g_free(cmd);
+ ahci_command_free(cmd);
/* Read back the guest's receive buffer into local memory */
bufread(ptr, rx, bufsize);
OpenPOWER on IntegriCloud