chiark / gitweb /
readahead-analyze: don't call fclose on null
authorLukas Nykryn <lnykryn@redhat.com>
Mon, 20 Aug 2012 13:15:40 +0000 (15:15 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 23 Aug 2012 11:53:30 +0000 (13:53 +0200)
src/readahead/readahead-analyze.c

index 11b2b2d..9a929c0 100644 (file)
@@ -144,6 +144,7 @@ int main_analyze(const char *pack_path) {
         return EXIT_SUCCESS;
 
 fail:
-        fclose(pack);
+        if(pack)
+                fclose(pack);
         return EXIT_FAILURE;
 }