aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/dd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 347a19454..9973a145b 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -397,5 +397,11 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
out_status:
dd_output_status(0);
+ if (ENABLE_FEATURE_CLEAN_UP) {
+ free(obuf);
+ if (flags & FLAG_TWOBUFS)
+ free(ibuf);
+ }
+
return exitcode;
}