|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
From 7057db8b36594bb03c611cab711cd992ad4de31e Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
From: Michal Schmidt <mschmidt@redhat.com>
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
Date: Tue, 17 Feb 2015 10:33:01 +0100
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
Subject: [PATCH] journal-remote: fix certificate status memory leak
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
The output of gnutls_certificate_verification_status_print() needs to be
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
freed.
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
Noticed this while staring at verify_cert_authorized() to see what could
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
possibly confuse gcc5 on armv7hl to segfault during compilation.
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
(cherry picked from commit 9c3cf9693ac5c0a332ba376f99e6adea28b1bb0d)
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
---
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
src/journal-remote/microhttpd-util.c | 1 +
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
1 file changed, 1 insertion(+)
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
diff --git a/src/journal-remote/microhttpd-util.c b/src/journal-remote/microhttpd-util.c
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
index 34d93379da..de9c6ab32d 100644
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
--- a/src/journal-remote/microhttpd-util.c
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
+++ b/src/journal-remote/microhttpd-util.c
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
@@ -179,6 +179,7 @@ static int verify_cert_authorized(gnutls_session_t session) {
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
return log_error_errno(r, "gnutls_certificate_verification_status_print failed: %m");
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
log_info("Certificate status: %s", out.data);
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
+ gnutls_free(out.data);
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
return status == 0 ? 0 : -EPERM;
|
|
Zbigniew Jędrzejewski-Szmek |
e4a83a |
}
|