+2004-08-08 16:20:37 Thomas Glanzmann <sithglan@stud.uni-erlangen.de> (roessler)
+
+ * muttlib.c, protos.h: Fix a memory leak.
+
2004-08-08 16:19:15 Thomas Roessler <roessler@does-not-exist.org> (roessler)
* pgp.c, smime.c: Fix the PGP and S/MIME menus. Complaints
{
if (!*p) return;
rfc822_free_address (&(*p)->return_path);
+ rfc822_free_address (&(*p)->from);
rfc822_free_address (&(*p)->to);
rfc822_free_address (&(*p)->cc);
rfc822_free_address (&(*p)->bcc);
rfc822_free_address (&(*p)->sender);
- rfc822_free_address (&(*p)->from);
rfc822_free_address (&(*p)->reply_to);
rfc822_free_address (&(*p)->mail_followup_to);
+
+ FREE (&(*p)->list_post);
FREE (&(*p)->subject);
+ /* real_subj is just an offset to subject and shouldn't be freed */
FREE (&(*p)->message_id);
FREE (&(*p)->supersedes);
FREE (&(*p)->date);
+ FREE (&(*p)->x_label);
+
+ mutt_free_buffer (&(*p)->spam);
+
mutt_free_list (&(*p)->references);
mutt_free_list (&(*p)->in_reply_to);
mutt_free_list (&(*p)->userhdrs);
mutt_buffer_add (buf, &c, 1);
}
+void mutt_free_buffer (BUFFER **p)
+{
+ if (!*p) return;
+
+ FREE(&(*p)->data);
+ /* dptr is just an offset to data and shouldn't be freed */
+ FREE(p);
+}
+
/* dynamically grows a BUFFER to accomodate s, in increments of 128 bytes.
* Always one byte bigger than necessary for the null terminator, and
* the buffer is always null-terminated */
void mutt_buffer_add (BUFFER*, const char*, size_t);
void mutt_buffer_addstr (BUFFER*, const char*);
void mutt_buffer_addch (BUFFER*, char);
+void mutt_free_buffer (BUFFER **);
#define mutt_system(x) _mutt_system(x,0)
int _mutt_system (const char *, int);