Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
channels: fix possible NULL dereference
  • Loading branch information
perexg committed Nov 13, 2015
1 parent 493f458 commit 280a8f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/channels.c
Expand Up @@ -92,7 +92,8 @@ channel_class_autoname_set ( void *obj, const void *p )
free(ch->ch_name);
ch->ch_name = strdup(s);
} else if (b) {
ch->ch_name[0] = '\0';
if (ch->ch_name)
ch->ch_name[0] = '\0';
}
ch->ch_autoname = b;
return 1;
Expand Down

0 comments on commit 280a8f5

Please sign in to comment.