Merge pull request #25379 from tchaikov/wip-37508

librbd: reset snaps in rbd_snap_list()

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2018-12-05 13:23:33 -05:00 committed by GitHub
commit 2a64af8928
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4471,6 +4471,7 @@ extern "C" int rbd_snap_list(rbd_image_t image, rbd_snap_info_t *snaps,
tracepoint(librbd, snap_list_exit, -EINVAL, 0);
return -EINVAL;
}
memset(snaps, 0, sizeof(*snaps) * *max_snaps);
int r = librbd::snap_list(ictx, cpp_snaps);
if (r == -ENOENT) {