]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
DVR: fix sigsegv in dvr thread, fixes #3260
authorJaroslav Kysela <perex@perex.cz>
Tue, 3 Nov 2015 20:02:17 +0000 (21:02 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 3 Nov 2015 20:02:17 +0000 (21:02 +0100)
src/dvr/dvr_rec.c

index 771c9caff6ac1bdfe131c09ac455905950c0d3c7..2de196ce972fa463e30170cbf631ac9006f71d8b 100644 (file)
@@ -1386,8 +1386,10 @@ fin:
        start_time = 0;
        started = 0;
        muxing = 0;
-       streaming_start_unref(ss);
-       ss = NULL;
+       if (ss) {
+         streaming_start_unref(ss);
+         ss = NULL;
+        }
       }
       break;
 
@@ -1450,6 +1452,9 @@ fin:
   if (prch->prch_muxer)
     dvr_thread_epilog(de, postproc);
 
+  if (ss)
+    streaming_start_unref(ss);
+
   free(postproc);
   return NULL;
 }