aboutsummaryrefslogtreecommitdiff
path: root/util-linux/readprofile.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/readprofile.c')
-rw-r--r--util-linux/readprofile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c
index b045657d8..394ece1dd 100644
--- a/util-linux/readprofile.c
+++ b/util-linux/readprofile.c
@@ -266,8 +266,10 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv)
printf("%6u %-40s %8.4f\n",
total, "total", total/(double)(fn_add-add0));
- fclose(map);
- free(buf);
+ if (ENABLE_FEATURE_CLEAN_UP) {
+ fclose(map);
+ free(buf);
+ }
return EXIT_SUCCESS;
}