[git commit master 1/1] dd: free allocated memory if CLEANUP enabled
Denys Vlasenko
vda.linux at googlemail.com
Tue Mar 22 16:42:29 UTC 2011
commit: http://git.busybox.net/busybox/commit/?id=f922154f65163bbab164ee377200b6412a367dd2
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev at nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
coreutils/dd.c | 6 ++++++
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;
}
--
1.7.3.4
More information about the busybox-cvs
mailing list