Skip to content

Commit 25e244b

Browse files
committed
messages server BUGFIX error check
1 parent e62c22b commit 25e244b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/messages_server.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,11 @@ nc_server_notif_new(struct lyd_node *event, char *eventtime, NC_PARAMTYPE paramt
861861
}
862862

863863
ntf = malloc(sizeof *ntf);
864+
if (!ntf) {
865+
ERRMEM;
866+
return NULL;
867+
}
868+
864869
if (paramtype == NC_PARAMTYPE_DUP_AND_FREE) {
865870
ntf->eventtime = strdup(eventtime);
866871
if (lyd_dup_single(event, NULL, LYD_DUP_RECURSIVE, &ntf->ntf)) {

0 commit comments

Comments
 (0)