summaryrefslogtreecommitdiff
path: root/mailbox/rfc2047.c
diff options
context:
space:
mode:
Diffstat (limited to 'mailbox/rfc2047.c')
-rw-r--r--mailbox/rfc2047.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mailbox/rfc2047.c b/mailbox/rfc2047.c
index bc6972b72..9e043d65f 100644
--- a/mailbox/rfc2047.c
+++ b/mailbox/rfc2047.c
@@ -224,8 +224,11 @@ mu_rfc2047_decode (const char *tocode, const char *input, char **ptostr)
free (fromcode);
free (encoding_type);
free (encoded_text);
-
- *ptostr = realloc (buffer, bufpos);
+
+ if (status)
+ free (buffer);
+ else
+ *ptostr = realloc (buffer, bufpos);
return status;
}

Return to:

Send suggestions and report system problems to the System administrator.