From 86b3650e427c771781c48518917fe9b5ef1b2f06 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 30 Apr 2015 10:48:09 +0200 Subject: [PATCH] subscriptions: fix possible NULL dereference --- src/subscriptions.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/subscriptions.c b/src/subscriptions.c index b44aff9b8..b401ce1d0 100644 --- a/src/subscriptions.c +++ b/src/subscriptions.c @@ -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; -- 2.47.2