From: <arc...@us...> - 2013-02-15 00:44:27
|
Revision: 636 http://sourceforge.net/p/sipp/code/636 Author: arcady-91 Date: 2013-02-15 00:44:25 +0000 (Fri, 15 Feb 2013) Log Message: ----------- Fixed memory leak Modified Paths: -------------- sipp/trunk/auth.c Modified: sipp/trunk/auth.c =================================================================== --- sipp/trunk/auth.c 2013-02-15 00:44:19 UTC (rev 635) +++ sipp/trunk/auth.c 2013-02-15 00:44:25 UTC (rev 636) @@ -588,6 +588,7 @@ /* compute XMAC */ f1(k,rnd,sqn,(unsigned char *) aka_AMF,xmac,op); if (memcmp(mac,xmac,MACLEN)!=0) { + free(nonce); sprintf(result,"createAuthHeaderAKAv1MD5 : MAC != eXpectedMAC -> Server might not know the secret (man-in-the-middle attack?) \n"); return 0; } @@ -603,6 +604,7 @@ resuf = createAuthHeaderMD5(user, (char *) res, RESLEN, method, uri, msgbody, auth, algo, result); if (resuf == 0) { sprintf(result,"createAuthHeaderAKAv1MD5 : Unexpected return value from createAuthHeaderMD5\n"); + free(nonce); return 0; } } else { @@ -617,6 +619,7 @@ resuf = createAuthHeaderMD5(user,"",0,method,uri,msgbody,auth,algo,result); if (resuf == 0) { sprintf(result,"createAuthHeaderAKAv1MD5 : Unexpected return value from createAuthHeaderMD5\n"); + free(nonce); return 0; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |