Fixed: double-free in mmsglobalsender
This commit is contained in:
parent
cfa26d3c75
commit
1bd576132d
|
@ -36,13 +36,13 @@ static Octstr *mms_resolve(Octstr * phonenum, void *module_data, void *settings_
|
|||
int j, m;
|
||||
|
||||
if (does_prefix_match(settings->local_prefix, phonenum)) {
|
||||
return settings->hostname;
|
||||
return settings->hostname ? octstr_duplicate(settings->hostname) : NULL;
|
||||
} else if (proxyrelays && list_len(proxyrelays) > 0) /* Step through proxies. */
|
||||
for (j = 0, m = list_len(proxyrelays); j < m; j++) {
|
||||
MmsProxyRelay *mp = list_get(proxyrelays, j);
|
||||
if (does_prefix_match(mp->allowed_prefix, phonenum) &&
|
||||
!does_prefix_match(mp->denied_prefix, phonenum)) {
|
||||
return mp->host;
|
||||
return octstr_duplicate(mp->host);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue