summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Nykryn <lnykryn@redhat.com>2012-08-20 15:15:40 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-08-23 13:53:30 +0200
commit403a56bf813014b111640ee804f6b1aa463ca15a (patch)
tree71e121f27de2814d396269df0d7eed0dea75ecbb
parent032f81645b3a60be316d7a0ed1e84443aa8737ba (diff)
readahead-analyze: don't call fclose on null
-rw-r--r--src/readahead/readahead-analyze.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/readahead/readahead-analyze.c b/src/readahead/readahead-analyze.c
index 11b2b2dc11..9a929c0937 100644
--- a/src/readahead/readahead-analyze.c
+++ b/src/readahead/readahead-analyze.c
@@ -144,6 +144,7 @@ int main_analyze(const char *pack_path) {
return EXIT_SUCCESS;
fail:
- fclose(pack);
+ if(pack)
+ fclose(pack);
return EXIT_FAILURE;
}