Minor bug fix (double free) in mmsbox
This commit is contained in:
parent
e92035851f
commit
ca05acedc9
|
@ -20,6 +20,8 @@
|
|||
#include "mms_uaprof.h"
|
||||
#include "mmsbox.h"
|
||||
|
||||
/* XXX warning, do not octstr_destroy cgi variables. They are destroyed by the http module! */
|
||||
|
||||
int rstop = 0;
|
||||
static void quit_now(int notused)
|
||||
{
|
||||
|
@ -1108,7 +1110,6 @@ static void sendmms_func(void *unused)
|
|||
vasid ? vasid : octstr_imm("sendmms-user"),
|
||||
u->faked_sender,
|
||||
1, &err);
|
||||
http_destroy_headers(rh);
|
||||
if (res < 0)
|
||||
rb = octstr_imm("Error in message conversion");
|
||||
} else if (!rb)
|
||||
|
@ -1116,15 +1117,17 @@ static void sendmms_func(void *unused)
|
|||
|
||||
http_send_reply(client, HTTP_BAD_REQUEST, hh,
|
||||
rb ? rb : octstr_imm("Sent"));
|
||||
|
||||
info(0, "MMSBox.mmssend: u=%s, %s",
|
||||
u ? octstr_get_cstr(u->user) : "none",
|
||||
(res == 0) ? "Sent" : "Not Sent");
|
||||
|
||||
if (rh)
|
||||
http_destroy_headers(rh);
|
||||
octstr_destroy(base_url);
|
||||
if (ctype)
|
||||
octstr_destroy(ctype);
|
||||
if (vasid)
|
||||
octstr_destroy(vasid);
|
||||
if (rb)
|
||||
octstr_destroy(rb);
|
||||
} else {
|
||||
http_send_reply(client, HTTP_UNAUTHORIZED, hh,
|
||||
octstr_imm("Authentication failed"));
|
||||
|
@ -1141,13 +1144,17 @@ static void sendmms_func(void *unused)
|
|||
|
||||
/* Free the ip and other stuff here. */
|
||||
octstr_destroy(ip);
|
||||
if (body) octstr_destroy(body);
|
||||
if (body)
|
||||
octstr_destroy(body);
|
||||
if (url)
|
||||
octstr_destroy(url);
|
||||
if (cgivars)
|
||||
http_destroy_cgiargs(cgivars);
|
||||
if (h)
|
||||
http_destroy_headers(h);
|
||||
if (hh)
|
||||
http_destroy_headers(hh);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,3 +6,6 @@
|
|||
- Queue module needs to be de-coupled slightly from storage, so that mmsproxy can run on a separate box
|
||||
but be able to initiate queue writes/reads over network. Hence pieces can run on separate boxes
|
||||
(with mmsrelay providing network service for queue functions)
|
||||
|
||||
- Generalise billing interface
|
||||
- Move outgoing VASP user/pass into URL
|
||||
|
|
Loading…
Reference in New Issue