1
0
Fork 0

Fixed: double-free in mmsglobalsender

This commit is contained in:
bagyenda 2006-05-22 10:06:22 +00:00
parent cfa26d3c75
commit 1bd576132d
3 changed files with 6 additions and 6 deletions

View File

@ -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);
}
}

View File

@ -251,7 +251,7 @@ static int sendMsg(MmsEnvelope *e)
break;
}
}
octstr_destroy(mmsc);
octstr_destroy(mmsc);
} else /* Search VASP list, see what you can find... */
for (j = 0, m = list_len(settings->vasp_list); j < m; j++)
if ((vasp = list_get(settings->vasp_list, j)) != NULL &&

View File

@ -407,9 +407,9 @@ void fetchmms_proxy(MmsHTTPClientInfo *h)
free_stuff:
if (notify_cmd) /* Inform provisioning server */
notify_prov_server(octstr_get_cstr(settings->prov_notify),
h->base_client_addr ? octstr_get_cstr(h->base_client_addr) : "unknown",
notify_cmd, notify_arg ? notify_arg : "");
notify_prov_server(octstr_get_cstr(settings->prov_notify),
h->base_client_addr ? octstr_get_cstr(h->base_client_addr) : "unknown",
notify_cmd, notify_arg ? notify_arg : "");
http_destroy_headers(rh);