Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bouquet: fix possible NULL dereference
  • Loading branch information
perexg committed Jun 19, 2015
1 parent c39a1dd commit bfb7644
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bouquet.c
Expand Up @@ -159,7 +159,7 @@ bouquet_find_by_source(const char *name, const char *src, int create)
bqs.bq_src = (char *)src;
bq = RB_FIND(&bouquets, &bqs, bq_link, _bq_cmp);
if (bq) {
if (name && *name && strcmp(name, bq->bq_name)) {
if (name && *name && bq->bq_name && strcmp(name, bq->bq_name)) {
tvhwarn("bouquet", "bouquet name '%s' changed to '%s'", bq->bq_name ?: "", name);
free(bq->bq_name);
bq->bq_name = strdup(name);
Expand Down

0 comments on commit bfb7644

Please sign in to comment.