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>
This commit is contained in:
Alexey Soloviev 2011-03-06 18:21:07 +01:00 committed by Denys Vlasenko
parent 4a2a86d5e7
commit 41478ade4f

View File

@ -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;
}