[Freeswitch-svn] [commit] r3402 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
mikej at freeswitch.org
Sat Nov 18 11:35:04 EST 2006
Author: mikej
Date: Sat Nov 18 11:35:03 2006
New Revision: 3402
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Log:
need to free the head pointer of malloc'd memory (form anthm's working copy)
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Sat Nov 18 11:35:03 2006
@@ -4116,7 +4116,7 @@
sip_www_authenticate_t const *authenticate = NULL;
switch_core_session_t *session = sofia_private ? sofia_private->session : NULL;
char const *realm = NULL;
- char *p = NULL, *qrealm = NULL;
+ char *p = NULL, *duprealm = NULL, *qrealm = NULL;
char const *scheme = NULL;
int index;
char *cur;
@@ -4157,8 +4157,9 @@
return;
}
- qrealm = strdup(realm);
-
+ duprealm = strdup(realm);
+ qrealm = duprealm;
+
while(*qrealm && *qrealm == '"') {
*qrealm++;
}
@@ -4184,7 +4185,7 @@
}
}
- switch_safe_free(qrealm);
+ switch_safe_free(duprealm);
if (!oreg) {
return;
More information about the Freeswitch-svn
mailing list