]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix crash when trying to configure adapters that are already in use.
authorNick Burrett <nick@sqrt.co.uk>
Wed, 29 Apr 2015 06:59:28 +0000 (07:59 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 29 Apr 2015 15:35:37 +0000 (17:35 +0200)
If another application has an adapter open, then la==NULL.  Skip the
adapter so that another can be configured.

src/input/mpegts/linuxdvb/linuxdvb_adapter.c

index 99602d206b7ed2fe66d0a86c79999f28992847e8..843809395ca864263fb5e637a0e70fc2978c96e6 100644 (file)
@@ -399,6 +399,10 @@ linuxdvb_adapter_add ( const char *path )
   /* Relock before exit */
   pthread_mutex_lock(&global_lock);
 
+  /* Adapter couldn't be opened; there's nothing to work with  */
+  if (!la)
+    return;
+
 #if DVB_VER_ATLEAST(5,5)
   memset(fetypes, 0, sizeof(fetypes));
   LIST_FOREACH(lfe, &la->la_frontends, lfe_link)