plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 5d3be932404680c053da66201f1e67af9a73f4d6
parent 07029cdbbd9be6ad780bd594c98d26babec7ee67
Author: rsc <devnull@localhost>
Date:   Tue, 24 Apr 2007 06:49:30 +0000

fix memory leak (bakul shah)

Diffstat:
Msrc/libsunrpc/udp.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/libsunrpc/udp.c b/src/libsunrpc/udp.c @@ -92,8 +92,7 @@ sunudpwrite(void *v) while((msg = recvp(arg.creply)) != nil){ if(udpwrite(arg.fd, &msg->udp, msg->msg.data, msg->msg.count) != msg->msg.count) fprint(2, "udpwrite: %r\n"); - free(msg->msg.data); - free(msg); + sunmsgdrop(&msg->msg); } }