Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
11117 libzfs_core: NULL pointer errors
Browse files Browse the repository at this point in the history
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
tsoome committed Jun 18, 2019
1 parent 281eb3a commit dd64585
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions usr/src/lib/libzfs_core/common/libzfs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ lzc_ioctl(zfs_ioc_t ioc, const char *name,
}
zc.zc_nvlist_dst = (uint64_t)(uintptr_t)
malloc(zc.zc_nvlist_dst_size);
if (zc.zc_nvlist_dst == NULL) {
if (zc.zc_nvlist_dst == 0) {
error = ENOMEM;
goto out;
}
Expand All @@ -174,7 +174,7 @@ lzc_ioctl(zfs_ioc_t ioc, const char *name,
zc.zc_nvlist_dst_size *= 2;
zc.zc_nvlist_dst = (uint64_t)(uintptr_t)
malloc(zc.zc_nvlist_dst_size);
if (zc.zc_nvlist_dst == NULL) {
if (zc.zc_nvlist_dst == 0) {
error = ENOMEM;
goto out;
}
Expand Down Expand Up @@ -1003,16 +1003,16 @@ lzc_channel_program(const char *pool, const char *program, uint64_t instrlimit,
* checkpoint at most, at any given time.
*
* ZFS_ERR_DISCARDING_CHECKPOINT
* ZFS is in the middle of discarding a checkpoint for this pool.
* The pool can be checkpointed again once the discard is done.
* ZFS is in the middle of discarding a checkpoint for this pool.
* The pool can be checkpointed again once the discard is done.
*
* ZFS_DEVRM_IN_PROGRESS
* A vdev is currently being removed. The pool cannot be
* checkpointed until the device removal is done.
* A vdev is currently being removed. The pool cannot be
* checkpointed until the device removal is done.
*
* ZFS_VDEV_TOO_BIG
* One or more top-level vdevs exceed the maximum vdev size
* supported for this feature.
* One or more top-level vdevs exceed the maximum vdev size
* supported for this feature.
*/
int
lzc_pool_checkpoint(const char *pool)
Expand All @@ -1038,10 +1038,10 @@ lzc_pool_checkpoint(const char *pool)
* This method may also return:
*
* ZFS_ERR_NO_CHECKPOINT
* The pool does not have a checkpoint.
* The pool does not have a checkpoint.
*
* ZFS_ERR_DISCARDING_CHECKPOINT
* ZFS is already in the middle of discarding the checkpoint.
* ZFS is already in the middle of discarding the checkpoint.
*/
int
lzc_pool_checkpoint_discard(const char *pool)
Expand Down

0 comments on commit dd64585

Please sign in to comment.