Index: net/third_party/nss/ssl/sslsecur.c |
diff --git a/net/third_party/nss/ssl/sslsecur.c b/net/third_party/nss/ssl/sslsecur.c |
index 49a81bc4e2f96aa25ac1db4bd875e198c792cbfe..fe1465daee2d6eb909dbe78a517b48efa4f19f84 100644 |
--- a/net/third_party/nss/ssl/sslsecur.c |
+++ b/net/third_party/nss/ssl/sslsecur.c |
@@ -902,6 +902,14 @@ ssl_CopySecurityInfo(sslSocket *ss, sslSocket *os) |
if (os->sec.rcvSecret.data && !ss->sec.rcvSecret.data) |
goto loser; |
+ SECITEM_CopyItem(0, ss->sec.userName, os->sec.userName); |
+ if (os->sec.userName->data && !ss->sec.userName->data) |
+ goto loser; |
+ SECITEM_CopyItem(0, ss->sec.userPasswd, os->sec.userPasswd); |
+ if (os->sec.userPasswd->data && !ss->sec.userPasswd->data) |
+ goto loser; |
+ |
+ |
/* XXX following code is wrong if either cx != 0 */ |
PORT_Assert(os->sec.readcx == 0); |
PORT_Assert(os->sec.writecx == 0); |
@@ -983,6 +991,15 @@ ssl_DestroySecurityInfo(sslSecurityInfo *sec) |
{ |
ssl_ResetSecurityInfo(sec, PR_FALSE); |
+ if (sec->userName) { |
+ SECITEM_FreeItem(sec->userName, PR_TRUE); |
+ sec->userName = NULL; |
+ } |
+ if (sec->userPasswd) { |
+ SECITEM_FreeItem(sec->userPasswd, PR_TRUE); |
+ sec->userPasswd = NULL; |
+ } |
+ |
PORT_ZFree(sec->writeBuf.buf, sec->writeBuf.space); |
sec->writeBuf.buf = 0; |