[Libpst-devel] pst_load_extended_attributes memory leak

Nigel Horne njh at bandsman.co.uk
Wed Apr 26 13:22:17 UTC 2006


wt is never freed

-Nigel Horne

*** Olibpst.c	Wed Apr 26 14:20:31 2006
--- libpst.c	Wed Apr 26 14:20:46 2006
***************
*** 443,448 ****
--- 443,449 ----
  	memset(wt, 0, tint+2);
  	memcpy(wt, &(headerbuffer[xattrib.extended+sizeof(tint)]), tint);
  	ptr->data = _pst_wide_to_single(wt, tint);
+ 	free(wt);
  	DEBUG_INDEX(("Read string (converted from UTF-16): %s\n", ptr->data));
        } else {
  	DEBUG_INDEX(("Cannot read outside of buffer [%i !< %i]\n", xattrib.extended, hsize));



More information about the Libpst-devel mailing list