Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
subscriptions: fix possible NULL dereference
  • Loading branch information
perexg committed Apr 30, 2015
1 parent 01406e0 commit 86b3650
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/subscriptions.c
Expand Up @@ -704,12 +704,14 @@ subscription_create_from_channel_or_service(profile_chain_t *prch,
th_subscription_t *s;
service_instance_t *si;
channel_t *ch = NULL;
int _error;

assert(prch);
assert(prch->prch_id);

if (error)
*error = 0;
if (error == NULL)
error = &_error;
*error = 0;

if (!service)
ch = prch->prch_id;
Expand Down

0 comments on commit 86b3650

Please sign in to comment.