libxenguest: use bitmap_alloc

Use existing helper to allocate a bitmap.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
[ wei: rebase to staging ]
Signed-off-by: Wei Liu <wl@xen.org>
This commit is contained in:
Olaf Hering authored and Wei Liu committed 2020-09-09 11:07:31 +00:00
1 parent b72aa3968d
commit 3cccdae452
1 file changed
+1 -1
+1 -1
View File
@@ -809,7 +809,7 @@ static int setup(struct xc_sr_context *ctx)
xch, dirty_bitmap, NRPAGES(bitmap_size(ctx->save.p2m_size)));
ctx->save.batch_pfns = malloc(MAX_BATCH_SIZE *
sizeof(*ctx->save.batch_pfns));
ctx->save.deferred_pages = calloc(1, bitmap_size(ctx->save.p2m_size));
ctx->save.deferred_pages = bitmap_alloc(ctx->save.p2m_size);
if ( !ctx->save.batch_pfns || !dirty_bitmap || !ctx->save.deferred_pages )
{
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.