Message ID | 831bd21e3be1653930c5d4b1a3c442d4e96a3b68.1522309741.git.osandov@fb.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/libbtrfsutil/subvolume.c b/libbtrfsutil/subvolume.c index d6c0ced8..867b3e10 100644 --- a/libbtrfsutil/subvolume.c +++ b/libbtrfsutil/subvolume.c @@ -1353,8 +1353,10 @@ PUBLIC enum btrfs_util_error btrfs_util_deleted_subvolumes_fd(int fd, new_capacity = capacity ? capacity * 2 : 1; new_ids = reallocarray(*ids, new_capacity, sizeof(**ids)); - if (!new_ids) - return BTRFS_UTIL_ERROR_NO_MEMORY; + if (!new_ids) { + err = BTRFS_UTIL_ERROR_NO_MEMORY; + goto out; + } *ids = new_ids; capacity = new_capacity;