]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
epgdb: check return value in epg_save()
authorJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 15:18:56 +0000 (17:18 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 15:18:56 +0000 (17:18 +0200)
src/epgdb.c

index db70347f8661dad350308d06a839ec1d4e67089c..4a3dabcc76f333500295feea36c3d6ce64776f52 100644 (file)
@@ -296,6 +296,8 @@ void epg_save ( void )
     gtimer_arm(&epggrab_save_timer, epg_save_callback, NULL, epggrab_epgdb_periodicsave);
   
   fd = hts_settings_open_file(1, "epgdb.v%d", EPG_DB_VERSION);
+  if (fd < 0)
+    return;
 
   memset(&stats, 0, sizeof(stats));
   if ( _epg_write_sect(fd, "brands") ) return;