Skip to content

Commit

Permalink
libzfs: zfs_asprintf(): don't return undefined pointer
Browse files Browse the repository at this point in the history
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
  • Loading branch information
nabijaczleweli committed May 3, 2021
1 parent 98fc166 commit 96e1098
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/libzfs/libzfs_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,10 @@ zfs_asprintf(libzfs_handle_t *hdl, const char *fmt, ...)

va_end(ap);

if (err < 0)
if (err < 0) {
(void) no_memory(hdl);
ret = NULL;
}

return (ret);
}
Expand Down

0 comments on commit 96e1098

Please sign in to comment.