zfs: main: don't NULL-check infallible safe_malloc()

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13229
This commit is contained in:
наб 2022-03-16 19:56:46 +01:00 committed by Brian Behlendorf
parent 18dbf5c8c3
commit 3cfbeb4e90
2 changed files with 1 additions and 3 deletions

View File

@ -5473,8 +5473,6 @@ parse_fs_perm_set(fs_perm_set_t *fspset, nvlist_t *nvl)
data_type_t type = nvpair_type(nvp); data_type_t type = nvpair_type(nvp);
fs_perm_t *fsperm = NULL; fs_perm_t *fsperm = NULL;
fs_perm_node_t *node = safe_malloc(sizeof (fs_perm_node_t)); fs_perm_node_t *node = safe_malloc(sizeof (fs_perm_node_t));
if (node == NULL)
nomem();
fsperm = &node->fspn_fsperm; fsperm = &node->fspn_fsperm;

View File

@ -31,7 +31,7 @@
extern "C" { extern "C" {
#endif #endif
void * safe_malloc(size_t size); void *safe_malloc(size_t size);
void nomem(void); void nomem(void);
extern libzfs_handle_t *g_zfs; extern libzfs_handle_t *g_zfs;