diff --git a/mbuni/extras/pgsql-queue/mms_pgsql_queue.c b/mbuni/extras/pgsql-queue/mms_pgsql_queue.c index c4a8fb1..c9f9234 100644 --- a/mbuni/extras/pgsql-queue/mms_pgsql_queue.c +++ b/mbuni/extras/pgsql-queue/mms_pgsql_queue.c @@ -423,6 +423,8 @@ static MmsEnvelope *pgq_queue_readenvelope(char *qf, char *mms_queuedir, int sho } done: + + octstr_destroy(from); if (r) PQclear(r); return e; diff --git a/mbuni/mmsbox/bearerbox.c b/mbuni/mmsbox/bearerbox.c index 5baa162..8655435 100644 --- a/mbuni/mmsbox/bearerbox.c +++ b/mbuni/mmsbox/bearerbox.c @@ -582,7 +582,6 @@ void mmsc_receive_func(MmscGrp *m) { int i; MmsBoxHTTPClientInfo h = {NULL}; - Octstr *err = NULL; List *mmsc_incoming_reqs = gwlist_create(); gwlist_add_producer(mmsc_incoming_reqs); @@ -981,13 +980,13 @@ static int sendMsg(MmsEnvelope *e) err ? octstr_get_cstr(err) : "(none)"); octstr_destroy(new_msgid); - + octstr_destroy(err); + e->lasttry = tnow; if (qfs->mms_queue_update(e) == 1) { e = NULL; break; /* Queue entry gone. */ } - octstr_destroy(err); } done2: diff --git a/mbuni/mmsbox/mmsbox.c b/mbuni/mmsbox/mmsbox.c index 5278664..1ce3786 100644 --- a/mbuni/mmsbox/mmsbox.c +++ b/mbuni/mmsbox/mmsbox.c @@ -1211,7 +1211,7 @@ static void dispatch_sendmms_recv(List *rl) octstr_strip_blanks(password); if ((u = auth_user(username, password)) != NULL && is_allowed_ip(sendmms_port.allow_ip, sendmms_port.deny_ip, h->ip)) { - Octstr *data, *ctype = NULL, *mmc, *to, *from, *dlr_url; + Octstr *data, *external_data = NULL, *ctype = NULL, *mmc, *to, *from, *dlr_url; Octstr *rr_url, *allow_adaptations, *subject = NULL; List *lto = NULL, *rh = http_create_empty_headers(); Octstr *rb = NULL, *base_url; @@ -1257,7 +1257,7 @@ static void dispatch_sendmms_recv(List *rl) base_url = url_path_prefix(data, URL_TYPE); data_url = octstr_duplicate(data); /* the URL of the message. */ - data = reply; + data = external_data = reply; /* We record it separately for deletion below. */ http_destroy_headers(reqh); http_destroy_headers(rh); @@ -1369,6 +1369,7 @@ static void dispatch_sendmms_recv(List *rl) octstr_destroy(rb); octstr_destroy(base_url); octstr_destroy(data_url); + octstr_destroy(external_data); } else { http_send_reply(h->client, HTTP_UNAUTHORIZED, hh, octstr_imm("Authentication failed"));