]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
opentv: ensure that we can't double delete table
authorAdam Sutton <dev@adamsutton.me.uk>
Thu, 5 Sep 2013 14:18:07 +0000 (15:18 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Thu, 5 Sep 2013 14:21:34 +0000 (15:21 +0100)
THis might happen if registering that the scan is complete removes
the table.

src/epggrab/module/opentv.c

index bd0fda7f27daf89c7f5b869f68252e023975e58b..ec9977e62f800bd93974f250e5b65565dc7b6e15 100644 (file)
@@ -478,15 +478,16 @@ done:
             mt2->mt_destroy    = opentv_status_destroy;
           }
         }
+        mpegts_table_destroy(mt);
       } else {
         tvhinfo(mt->mt_name, "summaries complete");
+        mpegts_table_destroy(mt);
         if (ota)
           epggrab_ota_complete((epggrab_module_ota_t*)mod, ota);
       }
+    } else {
+      mpegts_table_destroy(mt);
     }
-
-    /* Remove table handler */
-    mpegts_table_destroy(mt);
   }
 
   return 0;