diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index dc2d2fb64cb5cdd1b92ccacd96b5879be2a362d3..6c49e49c179705f348cbc2b7fff9c27a1459bb20 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -7622,9 +7622,7 @@ remoteNodeGetFreePages(virConnectPtr conn, goto done; } - if (VIR_ALLOC_N(args.pages.pages_val, npages) < 0) - goto done; - memcpy(args.pages.pages_val, pages, npages * sizeof(*pages)); + args.pages.pages_val = (u_int *) pages; args.pages.pages_len = npages; args.startCell = startCell; args.cellCount = cellCount;