Skip to content

Commit

Permalink
Check for null aliases list in nmsg_chalias_free.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmikk committed Apr 14, 2015
1 parent 2f06e98 commit 7e00aef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nmsg/chalias.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ nmsg_chalias_lookup(const char *ch, char ***alias) {

void
nmsg_chalias_free(char ***alias) {
if (*alias == NULL)
return;
for (char **a = *alias; *a != NULL; a++)
free(*a);
free(*alias);
Expand Down

0 comments on commit 7e00aef

Please sign in to comment.