From 6d9161ec61862af5f56e2f3074347a7a83a3a514 Mon Sep 17 00:00:00 2001 From: Steffen Pankratz Date: Mon, 26 Jun 2023 22:37:55 +0200 Subject: [PATCH] Fix warning: pointer 'io' may be used after 'fclose' Signed-off-by: Steffen Pankratz --- misc/make_self_extracting.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/make_self_extracting.c b/misc/make_self_extracting.c index e942f44..111028f 100644 --- a/misc/make_self_extracting.c +++ b/misc/make_self_extracting.c @@ -75,7 +75,10 @@ static off_t get_file_size(const char *fname) else if ((retval = ftello(io)) == -1) FAIL("ftello"); else if (fclose(io) == EOF) + { + io = NULL; FAIL("fclose"); + } // else if #undef FAIL return retval;