Commit 9ddac665 9ddac665fae01a9e81ce6c91c9edd29f81537e7c by Sergey Poznyakoff

(build_mime): Call message_unref.

1 parent 3fe508b7
...@@ -158,6 +158,7 @@ build_mime (mime_t *pmime, message_t msg, const char *text) ...@@ -158,6 +158,7 @@ build_mime (mime_t *pmime, message_t msg, const char *text)
158 stream_printf (stream, &off, "%s", text); 158 stream_printf (stream, &off, "%s", text);
159 stream_close (stream); 159 stream_close (stream);
160 mime_add_part (mime, newmsg); 160 mime_add_part (mime, newmsg);
161 message_unref (newmsg);
161 } 162 }
162 163
163 /* message/delivery-status */ 164 /* message/delivery-status */
...@@ -186,6 +187,7 @@ build_mime (mime_t *pmime, message_t msg, const char *text) ...@@ -186,6 +187,7 @@ build_mime (mime_t *pmime, message_t msg, const char *text)
186 stream_printf (stream, &off, "Last-Attempt-Date: %s\n", datestr); 187 stream_printf (stream, &off, "Last-Attempt-Date: %s\n", datestr);
187 stream_close (stream); 188 stream_close (stream);
188 mime_add_part(mime, newmsg); 189 mime_add_part(mime, newmsg);
190 message_unref (newmsg);
189 } 191 }
190 192
191 /* Quote original message */ 193 /* Quote original message */
...@@ -216,6 +218,7 @@ build_mime (mime_t *pmime, message_t msg, const char *text) ...@@ -216,6 +218,7 @@ build_mime (mime_t *pmime, message_t msg, const char *text)
216 } 218 }
217 stream_close (ostream); 219 stream_close (ostream);
218 mime_add_part (mime, newmsg); 220 mime_add_part (mime, newmsg);
221 message_unref (newmsg);
219 } 222 }
220 223
221 *pmime = mime; 224 *pmime = mime;
......