summaryrefslogtreecommitdiff
path: root/usr/src/stand/lib
diff options
context:
space:
mode:
authorjgj <none@none>2008-01-18 16:34:03 -0800
committerjgj <none@none>2008-01-18 16:34:03 -0800
commit1915be19b7a1f7c113b706bd54d6ca393e8d8107 (patch)
treed3faa1ba147dc992a0ec32b65c16c62bb7535604 /usr/src/stand/lib
parentc64380fd28a9c6885abd420225a75a57e46f6b75 (diff)
downloadillumos-gate-1915be19b7a1f7c113b706bd54d6ca393e8d8107.tar.gz
6648436 memory leak in standalone tcp code
Diffstat (limited to 'usr/src/stand/lib')
-rw-r--r--usr/src/stand/lib/tcp/tcp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/src/stand/lib/tcp/tcp.c b/usr/src/stand/lib/tcp/tcp.c
index 7525ce3f83..466d7ec812 100644
--- a/usr/src/stand/lib/tcp/tcp.c
+++ b/usr/src/stand/lib/tcp/tcp.c
@@ -6044,6 +6044,7 @@ tcp_xmit_mp(tcp_t *tcp, mblk_t *mp, int32_t max_to_send, int32_t *offset,
#ifdef DEBUG
printf("Multiple mblk %d\n", msgdsize(mp1));
#endif
+ mp2 = mp1;
new_mp = allocb(msgdsize(mp1) + tcp_wroff_xtra, 0);
new_mp->b_rptr += tcp_wroff_xtra;
new_mp->b_wptr = new_mp->b_rptr;
@@ -6053,7 +6054,7 @@ tcp_xmit_mp(tcp_t *tcp, mblk_t *mp, int32_t max_to_send, int32_t *offset,
new_mp->b_wptr += mp_size;
mp1 = mp1->b_cont;
}
- freemsg(mp1);
+ freemsg(mp2);
mp1 = new_mp;
}
tcp_set_cksum(mp1);