dovecot-2.2: lib-http: http_client_request_send() failure return...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 18 08:12:44 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/eddc7a17dd46
changeset: 18882:eddc7a17dd46
user: Timo Sirainen <tss at iki.fi>
date: Thu Jun 18 11:10:05 2015 +0300
description:
lib-http: http_client_request_send() failure returned already-freed error string.
diffstat:
src/lib-http/http-client-request.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (20 lines):
diff -r 7f7b77feb9ce -r eddc7a17dd46 src/lib-http/http-client-request.c
--- a/src/lib-http/http-client-request.c Wed Jun 17 16:37:37 2015 +0300
+++ b/src/lib-http/http-client-request.c Thu Jun 18 11:10:05 2015 +0300
@@ -832,11 +832,16 @@
int http_client_request_send(struct http_client_request *req,
const char **error_r)
{
+ char *errstr = NULL;
int ret;
T_BEGIN {
ret = http_client_request_send_real(req, error_r);
+ if (ret < 0)
+ errstr = i_strdup(*error_r);
} T_END;
+ *error_r = t_strdup(errstr);
+ i_free(errstr);
return ret;
}
More information about the dovecot-cvs
mailing list