Hi all,
I found a memory leak in tcp_pdu_encode function and I try to fix it.
Regards,
Manuele
=== modified file 'uspace/srv/net/tcp/pdu.c'
--- uspace/srv/net/tcp/pdu.c 2015-05-22 07:21:37 +0000
+++ uspace/srv/net/tcp/pdu.c 2016-03-29 10:06:56 +0000
@@ -333,8 +333,10 @@
text_size = tcp_segment_text_size(seg);
npdu->text = calloc(1, text_size);
- if (npdu->text == NULL)
+ if (npdu->text == NULL) {
+ free(npdu);
return ENOMEM;
+ }
npdu->text_size = text_size;
memcpy(npdu->text, seg->data, text_size);
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/listinfo/helenos-devel