[Freeassociation-devel] Memory leak patches. One more

Alvaro Manera alvaro.manera at nokia.com
Tue Jun 2 00:04:40 PDT 2009


Hi again everybody.

Here I continue hunting memory leaks. This time is a combined patch fixing the 
same issue on many files. The patch changes doing the malloc when 
initializing the pointer and aftewards checking if the pointers received are 
ok (in case they are not there is a leak).

Eg:
Changing this:
	char* str = (char*)icalmemory_new_buffer(MAX_INT_DIGITS);
	pointer check;

To:

	char *str;
	pointer check;

	str = (char*)icalmemory_new_buffer(MAX_INT_DIGITS);

Álvaro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twophase_inif.diff
Type: text/x-diff
Size: 2992 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libical-devel/attachments/20090602/0667058d/attachment.bin>


More information about the libical-devel mailing list