From fc02df658325d7cb4c54b35a1b8f273e35e1cf6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ya=C4=9F=C4=B1z=20Zengin?= Date: Mon, 17 Jun 2024 11:41:55 +0300 Subject: [PATCH] pmt: Fix FORTIFY problems --- jni/listpart.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jni/listpart.c b/jni/listpart.c index 0cf6dff..edc0d3f 100755 --- a/jni/listpart.c +++ b/jni/listpart.c @@ -66,6 +66,7 @@ int listpart(void) { while ((entry = readdir(dir)) != NULL) printf("%s\n", entry->d_name); closedir(dir); + dir = NULL; if (pmt_logical) { @@ -82,6 +83,7 @@ int listpart(void) { while ((entry = readdir(dir)) != NULL) printf("%s\n", entry->d_name); closedir(dir); + dir = NULL; if (pmt_ab && !pmt_silent) warnx(ANSI_YELLOW "warning: device using A/B partition style." ANSI_RESET); @@ -94,4 +96,4 @@ int listpart(void) { } #endif /* __cplusplus */ -/* end of code */ \ No newline at end of file +/* end of code */