Skip to content

Commit

Permalink
Add co <> NULL varilation
Browse files Browse the repository at this point in the history
  • Loading branch information
oboroc committed Jan 22, 2017
1 parent adf2ce9 commit dd6c1a7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bdecli.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,13 @@ int bde_cfg_add_entry(bde_entry_t *list, char *szFQNPath, char *szName, char *sz
i++;
}

/* validate that container is not NULL */
if (NULL == co)
{
fprintf_s(stderr, "Error in bde_cfg_add_entry(): container is NULL\n");
exit(1);
}

/* we have proper container, now we should modify or add variable */
current = co->next;
while ((current) && (current->container == co))
Expand Down

0 comments on commit dd6c1a7

Please sign in to comment.