diff options
author | Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com> | 2011-03-06 18:21:07 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-03-06 18:21:07 +0100 |
commit | 41478ade4f28cbacd954c9663d851c374d33f6b9 (patch) | |
tree | c4ffbe81771122a2f063a4a199ea306c6aea65b1 /coreutils/tr.c | |
parent | 4a2a86d5e7e7bf284a31af604a738dfa1f1a2240 (diff) | |
download | busybox-w32-41478ade4f28cbacd954c9663d851c374d33f6b9.tar.gz busybox-w32-41478ade4f28cbacd954c9663d851c374d33f6b9.tar.bz2 busybox-w32-41478ade4f28cbacd954c9663d851c374d33f6b9.zip |
tr: free allocated memory in tr if CLEANUP enabled
Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/tr.c')
-rw-r--r-- | coreutils/tr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/coreutils/tr.c b/coreutils/tr.c index 21d77ef95..5b2b9a9a4 100644 --- a/coreutils/tr.c +++ b/coreutils/tr.c | |||
@@ -324,5 +324,11 @@ int tr_main(int argc UNUSED_PARAM, char **argv) | |||
324 | str2[out_index++] = last = coded; | 324 | str2[out_index++] = last = coded; |
325 | } | 325 | } |
326 | 326 | ||
327 | if (ENABLE_FEATURE_CLEAN_UP) { | ||
328 | free(vector); | ||
329 | free(str2); | ||
330 | free(str1); | ||
331 | } | ||
332 | |||
327 | return EXIT_SUCCESS; | 333 | return EXIT_SUCCESS; |
328 | } | 334 | } |