[Libpst-devel] libpst.c memory leaks in error case
(_pst_parse_block)
Nigel Horne
njh at bandsman.co.uk
Tue Apr 25 18:15:19 UTC 2006
This patch fixes memory leaks on error returns:
*** Olibpst.c 2006-04-25 19:13:12.000000000 +0100
--- libpst.c 2006-04-25 19:13:44.000000000 +0100
***************
*** 1401,1406 ****
--- 1401,1408 ----
} else {
WARN(("Missing code for block_type %i\n", block_type));
if (buf) free(buf);
+ if(na_head)
+ _pst_free_list(na_head);
DEBUG_RET();
return NULL;
}
***************
*** 1544,1549 ****
--- 1546,1553 ----
na_ptr->items[x]->type = table_rec.ref_type;
} else {
WARN(("ERROR Unknown ref_type %#x\n", table_rec.ref_type));
+ if(na_head)
+ _pst_free_list(na_head);
DEBUG_RET();
return NULL;
}
--
Nigel Horne. Arranger, Adjudicator, Band Trainer, Composer, Tutor,
Typesetter.
NJH Music, Barnsley, UK. ICQ#20252325
njh at bandsman.co.uk http://www.bandsman.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: njh.vcf
Type: text/x-vcard
Size: 181 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/libpst-devel/attachments/20060425/ca12ce05/njh.vcf
More information about the Libpst-devel
mailing list