1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-30 08:19:09 +00:00

libzfs: zfs_asprintf(): don't return undefined pointer

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11993
This commit is contained in:
наб 2021-05-03 12:30:16 +02:00 committed by Brian Behlendorf
parent 87b671f3ac
commit 2babd20045

View File

@ -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);
}