changeset 21782:9be4810c8033

lib-lda: smtp-client: Fixed memory leak of the error message string.
author Stephan Bosch <stephan.bosch@dovecot.fi>
date Thu, 02 Mar 2017 23:12:45 +0100
parents cc0c9ccd3113
children d0a35b1482d6
files src/lib-lda/smtp-client.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-lda/smtp-client.c	Thu Mar 02 23:51:45 2017 +0100
+++ b/src/lib-lda/smtp-client.c	Thu Mar 02 23:12:45 2017 +0100
@@ -213,7 +213,8 @@
 {
 	if (client->error == NULL) {
 		client->tempfail = tempfail;
-		client->error = i_strdup_printf("smtp(%s): %s",
+		client->error = p_strdup_printf(client->pool,
+			"smtp(%s): %s",
 			client->set->submission_host, error);
 	}
 }