Module: kamailio
Branch: master
Commit: 366104d2f79ccfa65850cd2e3bfb5ed8be467bc2
URL:
https://github.com/kamailio/kamailio/commit/366104d2f79ccfa65850cd2e3bfb5ed…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-03T11:45:26+02:00
seas: avoid double free and leak
---
Modified: src/modules/seas/seas_action.c
Modified: src/modules/seas/utils.c
---
Diff:
https://github.com/kamailio/kamailio/commit/366104d2f79ccfa65850cd2e3bfb5ed…
Patch:
https://github.com/kamailio/kamailio/commit/366104d2f79ccfa65850cd2e3bfb5ed…
---
diff --git a/src/modules/seas/seas_action.c b/src/modules/seas/seas_action.c
index 3258ffe328..3cb5513fbd 100644
--- a/src/modules/seas/seas_action.c
+++ b/src/modules/seas/seas_action.c
@@ -518,7 +518,7 @@ int ac_cancel(as_p the_as,unsigned char processor_id,unsigned int
flags,char *ac
if(headers.s)
pkg_free(headers.s);
if(body.s)
- pkg_free(headers.s);
+ pkg_free(body.s);
if(my_msg){
if(my_msg->headers)
free_hdr_field_lst(my_msg->headers);
diff --git a/src/modules/seas/utils.c b/src/modules/seas/utils.c
index 367ba7413e..76c2c6af5e 100644
--- a/src/modules/seas/utils.c
+++ b/src/modules/seas/utils.c
@@ -90,6 +90,7 @@ int buffered_printer(FILE* infd)
printf("PARSED:%d,last=%d,end=%d\n",k++,last,end);
free_sip_msg(&msg);
pkg_free(missatge);
+ missatge = NULL;
memmove(mybuffer,&mybuffer[end],1400-end);
last=1400-end;
}