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>
This commit is contained in:
Alexey Soloviev 2011-03-16 10:39:46 +03:00 committed by Denys Vlasenko
parent beea5a70c3
commit f922154f65

View File

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