Skip to content

Commit

Permalink
Merge pull request #17 from cmikk/bugfix-chalias_free
Browse files Browse the repository at this point in the history
Check for null aliases list in nmsg_chalias_free.
  • Loading branch information
edmonds committed May 5, 2015
2 parents 740eed3 + 7e00aef commit 6970b70
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 6970b70

Please sign in to comment.