diff options
author | Alexey Soloviev | 2011-03-16 10:39:46 +0300 |
---|---|---|
committer | Denys Vlasenko | 2011-03-22 17:42:29 +0100 |
commit | f922154f65163bbab164ee377200b6412a367dd2 (patch) | |
tree | 2ca287ab365644d1eef14b6f2367dc87d8bb15aa | |
parent | beea5a70c34bdcf2b02c37e6f56d2efcbd90fedb (diff) | |
download | busybox-f922154f65163bbab164ee377200b6412a367dd2.zip busybox-f922154f65163bbab164ee377200b6412a367dd2.tar.gz |
dd: free allocated memory if CLEANUP enabled
Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | 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; } |