Skip to content

Commit

Permalink
ahci-test: fix memory leak
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jnsnow committed Jan 11, 2016
1 parent 4ab0359 commit 248de4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/ahci-test.c
Expand Up @@ -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);
Expand Down

0 comments on commit 248de4a

Please sign in to comment.