nvme: Fix memleak in nvme_dma_read_prp

Signed-off-by: Lu Lina <lina.lulina@huawei.com>
Acked-by: Keith Busch <keith.busch@intel.com>
Message-id: 1434695254-69808-1-git-send-email-kathy.wangting@huawei.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Lu Lina 2015-06-19 14:27:34 +08:00 committed by Stefan Hajnoczi
parent d5941ddae8
commit 25940fa7e5
1 changed files with 1 additions and 0 deletions

View File

@ -154,6 +154,7 @@ static uint16_t nvme_dma_read_prp(NvmeCtrl *n, uint8_t *ptr, uint32_t len,
qemu_sglist_destroy(&qsg);
return NVME_INVALID_FIELD | NVME_DNR;
}
qemu_sglist_destroy(&qsg);
return NVME_SUCCESS;
}