This patch fixes memory leak for ibuff and obuff if default case of switch hit.
Signed-off-by: Maninder Singh <[email protected]> Reviewed-by: Akhilesh Kumar <[email protected]> --- testcases/kernel/io/disktest/dump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/kernel/io/disktest/dump.c b/testcases/kernel/io/disktest/dump.c index ffb5ce1..615e8b4 100644 --- a/testcases/kernel/io/disktest/dump.c +++ b/testcases/kernel/io/disktest/dump.c @@ -163,6 +163,8 @@ int dump_data(FILE * stream, const char *buff, const size_t buff_siz, fprintf(stream, "%s\n", obuff); break; default: + FREE(ibuff); + FREE(obuff); return (-1); } } -- 1.7.9.5 ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
