aboutsummaryrefslogtreecommitdiff
path: root/lib/dma.c
diff options
context:
space:
mode:
authorswapnili <swapnil.ingle@nutanix.com>2021-01-08 17:02:44 +0100
committerGitHub <noreply@github.com>2021-01-08 17:02:44 +0100
commit9ce88433cc185866519fb0ec3ef84d99db739b9f (patch)
treec013b9c5b050c969e6ecb051a461ea16c2147057 /lib/dma.c
parentd211f2cf4920e7f082bb5e707c672cecb6f52a6c (diff)
downloadlibvfio-user-9ce88433cc185866519fb0ec3ef84d99db739b9f.zip
libvfio-user-9ce88433cc185866519fb0ec3ef84d99db739b9f.tar.gz
libvfio-user-9ce88433cc185866519fb0ec3ef84d99db739b9f.tar.bz2
Fix error path (#229)
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/dma.c')
-rw-r--r--lib/dma.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/dma.c b/lib/dma.c
index 59d85eb..1d6b505 100644
--- a/lib/dma.c
+++ b/lib/dma.c
@@ -450,6 +450,7 @@ int dma_controller_dirty_page_logging_start(dma_controller_t *dma, size_t pgsize
if (region->dirty_bitmap == NULL) {
int j, ret = -errno;
for (j = 0; j < i; j++) {
+ region = &dma->regions[j];
free(region->dirty_bitmap);
region->dirty_bitmap = NULL;
}