]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Wed May 13 11:00:40 CDT 2009 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Fri, 15 May 2009 16:05:59 +0000 (16:05 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 15 May 2009 16:05:59 +0000 (16:05 +0000)
  * auth_client.c: removed leak in auc_digest_authorization()
  Ignore-this: 9b0297083b6c6ce1bf9ef3d723b01f3b

  Coverity issue.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13337 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c

index 8ff303cd629847e9744f0a574c15e6a2f2c6b2e5..185e7780961276a377209423d1bfb5d0e9c38db1 100644 (file)
@@ -1 +1 @@
-Fri May 15 11:04:52 CDT 2009
+Fri May 15 11:05:48 CDT 2009
index 0850f7bd79510aa6b89d5e411dea02255d618604..3ad92407c5801cd6a3945a761e45a40482e8dcec 100644 (file)
@@ -919,9 +919,9 @@ int auc_digest_authorization(auth_client_t *ca,
   auth_challenge_t const *ac = cda->cda_ac;
   char const *cnonce = cda->cda_cnonce;
   unsigned nc = ++cda->cda_ncount;
-  char *uri = url_as_string(home, url);
   void const *data = body ? body->pl_data : "";
   usize_t dlen = body ? body->pl_len : 0;
+  char *uri;
 
   msg_header_t *h;
   auth_hexmd5_t sessionkey, response;
@@ -942,7 +942,10 @@ int auc_digest_authorization(auth_client_t *ca,
   ar->ar_qop = NULL;
   ar->ar_auth = ac->ac_auth;
   ar->ar_auth_int = ac->ac_auth_int;
-  ar->ar_uri = uri;
+  ar->ar_uri = uri = url_as_string(home, url);
+
+  if (ar->ar_uri == NULL)
+    return -1;
 
   /* If there is no qop, we MUST NOT include cnonce or nc */
   if (!ar->ar_auth && !ar->ar_auth_int)