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 */