summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-06-14 12:52:02 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-06-14 12:52:02 +0200
commitbcd956d4d500040808b920e468529da94a1e33c8 (patch)
tree30dc8ac23c848c69a9e06173b0ace544a2c93ac7 /runtime
parentf847c2dda32488034f252e3bbd1a267714b99ff0 (diff)
downloadrsyslog-bcd956d4d500040808b920e468529da94a1e33c8.tar.gz
rsyslog-bcd956d4d500040808b920e468529da94a1e33c8.tar.xz
rsyslog-bcd956d4d500040808b920e468529da94a1e33c8.zip
bugfix: memory leak in imtcp & subsystems under some circumstances
This leak is tied to error conditions which lead to incorrect cleanup of some data structures. [backport from v6, limited testing under v4]
Diffstat (limited to 'runtime')
-rw-r--r--runtime/nsd_gtls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c
index fb2e219d..e1dcf870 100644
--- a/runtime/nsd_gtls.c
+++ b/runtime/nsd_gtls.c
@@ -1118,6 +1118,7 @@ gtlsEndSess(nsd_gtls_t *pThis)
}
}
gnutls_deinit(pThis->sess);
+ pThis->bHaveSess = 0;
}
RETiRet;
}
@@ -1171,6 +1172,8 @@ CODESTARTobjDestruct(nsd_gtls)
gnutls_x509_crt_deinit(pThis->ourCert);
if(pThis->bOurKeyIsInit)
gnutls_x509_privkey_deinit(pThis->ourKey);
+ if(pThis->bHaveSess)
+ gnutls_deinit(pThis->sess);
ENDobjDestruct(nsd_gtls)