]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
subscriptions: fix possible NULL dereference
authorJaroslav Kysela <perex@perex.cz>
Thu, 30 Apr 2015 08:48:09 +0000 (10:48 +0200)
committerJaroslav Kysela <perex@perex.cz>
Thu, 30 Apr 2015 08:48:09 +0000 (10:48 +0200)
src/subscriptions.c

index b44aff9b8bd06cb4593bbfcb1a26a89db002b655..b401ce1d0e9b8d5c01f69bb25458cf4fcd8dec94 100644 (file)
@@ -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;