[Libpst-devel] Error handling memory leaks in libpst.c
Nigel Horne
njh at bandsman.co.uk
Fri Apr 28 11:48:13 UTC 2006
A couple of more patches,
-Nigel
*** Olibpst.c 2006-04-28 12:22:24.000000000 +0100
--- libpst.c 2006-04-28 12:31:23.000000000 +0100
***************
*** 1117,1122 ****
--- 1117,1124 ----
DEBUG_EMAIL(("ATTACHEMENT processing attachement\n"));
if ((list = _pst_parse_block(pf, id_ptr->id, id2_head)) == NULL) {
+ _pst_free_id2(id2_head);
+ _pst_free_list(list);
DEBUG_WARN(("ERROR error processing main attachment record\n"));
DEBUG_RET();
return NULL;
***************
*** 1132,1139 ****
item->current_attach = item->attach;
if (_pst_process(list, item)) {
DEBUG_WARN(("ERROR _pst_process() failed with attachments\n"));
- _pst_free_list(list);
DEBUG_RET();
return NULL;
}
--- 1134,1142 ----
item->current_attach = item->attach;
if (_pst_process(list, item)) {
+ _pst_free_id2(id2_head);
+ _pst_free_list(list);
DEBUG_WARN(("ERROR _pst_process() failed with attachments\n"));
DEBUG_RET();
return NULL;
}
More information about the Libpst-devel
mailing list