Skip to contentSkip to conversation

io: fix memory leak

PATCH In review Maninder Singh 2 participants 2 messages Jun 15, 2015 – Jul 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io: fix memory leak

This patch fixes memory leak for ibuff and obuff
if default case of switch hit.

---
 testcases/kernel/io/disktest/dump.c |    2 ++
 1 file changed, 2 insertions(+)
testcases/kernel/io/disktest/dump.c +2 -0
index ffb5ce1..615e8b4 100644
@@ -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);
 		}
 	}
Signature · 6 lines
1.7.9.5
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw

Hi!
Pushed, thanks.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list