need to free the head pointer of malloc'd memory (form anthm's working copy)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3402 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
6f448d96c5
commit
4f2824e371
|
@ -4116,7 +4116,7 @@ static void sip_r_register(int status,
|
||||||
sip_www_authenticate_t const *authenticate = NULL;
|
sip_www_authenticate_t const *authenticate = NULL;
|
||||||
switch_core_session_t *session = sofia_private ? sofia_private->session : NULL;
|
switch_core_session_t *session = sofia_private ? sofia_private->session : NULL;
|
||||||
char const *realm = NULL;
|
char const *realm = NULL;
|
||||||
char *p = NULL, *qrealm = NULL;
|
char *p = NULL, *duprealm = NULL, *qrealm = NULL;
|
||||||
char const *scheme = NULL;
|
char const *scheme = NULL;
|
||||||
int index;
|
int index;
|
||||||
char *cur;
|
char *cur;
|
||||||
|
@ -4157,8 +4157,9 @@ static void sip_r_register(int status,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
qrealm = strdup(realm);
|
duprealm = strdup(realm);
|
||||||
|
qrealm = duprealm;
|
||||||
|
|
||||||
while(*qrealm && *qrealm == '"') {
|
while(*qrealm && *qrealm == '"') {
|
||||||
*qrealm++;
|
*qrealm++;
|
||||||
}
|
}
|
||||||
|
@ -4184,7 +4185,7 @@ static void sip_r_register(int status,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_safe_free(qrealm);
|
switch_safe_free(duprealm);
|
||||||
|
|
||||||
if (!oreg) {
|
if (!oreg) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue