From: Jernej Fijačko Date: Wed, 3 Oct 2012 10:32:16 +0000 (+0300) Subject: xmltv_load_grabbers - only call closedir when opendir was successfull X-Git-Tag: v3.5~405 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F157%2Fhead;p=thirdparty%2Ftvheadend.git xmltv_load_grabbers - only call closedir when opendir was successfull I'm working on an android build and it crashes here if opendir returns NULL. Not sure if this is also an issue on other systems. --- diff --git a/src/epggrab/module/xmltv.c b/src/epggrab/module/xmltv.c index 008e42405..83d050477 100644 --- a/src/epggrab/module/xmltv.c +++ b/src/epggrab/module/xmltv.c @@ -667,8 +667,8 @@ static void _xmltv_load_grabbers ( void ) free(outbuf); } } + closedir(dir); } - closedir(dir); tmp = strtok(NULL, ":"); } free(path);