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