diff options
Diffstat (limited to 'lib/unknown/unknown.c')
-rw-r--r-- | lib/unknown/unknown.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/unknown/unknown.c b/lib/unknown/unknown.c index de449bfe..8f5c8096 100644 --- a/lib/unknown/unknown.c +++ b/lib/unknown/unknown.c @@ -94,8 +94,10 @@ struct segment_type *init_unknown_segtype(struct cmd_context *cmd, const char *n { struct segment_type *segtype = dm_zalloc(sizeof(*segtype)); - if (!segtype) - return_NULL; + if (!segtype) { + log_error("Failed to allocate memory for unknown segtype"); + return NULL; + } segtype->cmd = cmd; segtype->ops = &_unknown_ops; |