1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-29 06:50:16 +03:00

journal-remote: fix client_cert memory leak

Found by Valgrind while testing the previous memory leak fix.
This commit is contained in:
Michal Schmidt 2015-02-17 10:36:57 +01:00
parent 9c3cf9693a
commit 32c3d7144c
Notes: Lennart Poettering 2015-05-21 17:08:33 +02:00
Backport: bugfix

View File

@ -239,10 +239,14 @@ static int get_auth_dn(gnutls_x509_crt_t client_cert, char **buf) {
return 0;
}
static inline void gnutls_x509_crt_deinitp(gnutls_x509_crt_t *p) {
gnutls_x509_crt_deinit(*p);
}
int check_permissions(struct MHD_Connection *connection, int *code, char **hostname) {
const union MHD_ConnectionInfo *ci;
gnutls_session_t session;
gnutls_x509_crt_t client_cert;
_cleanup_(gnutls_x509_crt_deinitp) gnutls_x509_crt_t client_cert = NULL;
_cleanup_free_ char *buf = NULL;
int r;