summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/dd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 347a194..9973a14 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;
}