Re: Memory leak in smsbox

Stipe Tolj <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Organization tolj.org system architecture
Message-ID <[email protected]>
Peter Christensen wrote:

> diff -Nru gateway/gw/smsbox.c gateway.leak/gw/smsbox.c
> --- gateway/gw/smsbox.c	2005-12-09 03:14:31.000000000 +0100
> +++ gateway.leak/gw/smsbox.c	2006-01-20 21:30:57.000000000 +0100
> @@ -2119,7 +2119,7 @@
>  	newfrom = octstr_duplicate(global_sender);
>      } else {
>  	returnerror = octstr_create("Sender missing and no global set, rejected");
> -	goto fielderror2;
> +	goto fielderror3;
>      }

can we revise this to keep the present goto labels instead of introducing new 
ones? The flow-control-logic in that function get's too complicated.

>      info(0, "sendsms sender:<%s:%s> (%s) to:<%s> msg:<%s>",
> @@ -2365,6 +2365,11 @@
>      octstr_destroy(newfrom);
>      msg_destroy(msg);
>  
> +fielderror3:
> +    gwlist_destroy(allowed, NULL);
> +    gwlist_destroy(denied, NULL);
> +    gwlist_destroy(receiver, octstr_destroy_item);
> +

why don't we gwlist_destroy([allowed|denied], octstr_destroy_item) too?


>  fielderror2:
>      alog("send-SMS request failed - %s",
>           octstr_get_cstr(returnerror));


Stipe

-------------------------------------------------------------------
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture      Kannel Software Foundation (KSF)
http://www.tolj.org/              http://www.kannel.org/

mailto:st_{at}_tolj.org           mailto:stolj_{at}_kannel.org
-------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.