Re: [PATCH] Revised smsbox leak/segfault patch

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

> Hi,
> 
> I know it is long ago, but back in the beginning of February, I posted a 
> patch which resolved a number of memory leaks and potential segmentation 
> faults in the smsbox_req_handle. The patch was not accepted, apparently 
> primary due to a lot of ugly labels and stuff. So now, 3 months later, 
> I've taken the time to do a prettier patch (hopefully).
> 
> To summarize:
> 
> * Relevant List and Octstr variables are initialized to NULL
> * All field errors jump to field_error label
> * Transmission failure jump to transmission_error label
> * Regardless of the outcome, memory cleanup and function termination is 
> the same piece of code (labeled cleanup)
> 
> Without this patch, newfrom, denied, allowed, receiver, and failed_id 
> might not be freed, depending on the error condition. When I worked with 
> the old patch, segmentation faults was also possible under the right 
> circumstances, but apparently this is not the case anymore (or x86-64 
> behave different than x86 - I've changed architecture since then)
> 
> 
> I apologize for the long delay, but my mind have been elsewhere. And 
> since my own installation of kannel is patched with my old patch, I 
> haven't experienced leaks and segmentation faults since, and have thus 
> not been reminded of the issue. (This is actually also the case with the 
> MySQL escaping in dlr_mysql.c)

Hi Peter,

thanks a lot for the revised re-submission. I'll will have a review go this 
afternoon on this.

(Which does not mean that other should not ;)... so if people tend to review, 
please vote also).

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.