projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a2a86d
)
tr: free allocated memory in tr if CLEANUP enabled
author
Alexey Soloviev
<EXT-Alexey.Soloviev@nokia.com>
Sun, 6 Mar 2011 17:21:07 +0000
(18:21 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 6 Mar 2011 17:21:07 +0000
(18:21 +0100)
Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/tr.c
patch
|
blob
|
history
diff --git
a/coreutils/tr.c
b/coreutils/tr.c
index 21d77ef95604d5f2040edf301e9a6df28d5a1c55..5b2b9a9a4789ea909018aa14fa933fc92d4fc4d2 100644
(file)
--- a/
coreutils/tr.c
+++ b/
coreutils/tr.c
@@
-324,5
+324,11
@@
int tr_main(int argc UNUSED_PARAM, char **argv)
str2[out_index++] = last = coded;
}
+ if (ENABLE_FEATURE_CLEAN_UP) {
+ free(vector);
+ free(str2);
+ free(str1);
+ }
+
return EXIT_SUCCESS;
}