diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-12-19 11:20:59 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-12-19 11:20:59 +0100 |
commit | 6bcc1e371b8c27b227a7c87f475063f7fddfd44f (patch) | |
tree | 0941df531236de6a65b5ddaf02a07020fdc11a97 /runtime | |
parent | be2383f2b80d4fb83abd2765e6467e8d7614ab49 (diff) | |
parent | 5fe837bf7dbdcc245ee233feb1fbcc6d052a4898 (diff) | |
download | rsyslog-6bcc1e371b8c27b227a7c87f475063f7fddfd44f.tar.gz rsyslog-6bcc1e371b8c27b227a7c87f475063f7fddfd44f.tar.xz rsyslog-6bcc1e371b8c27b227a7c87f475063f7fddfd44f.zip |
Merge branch 'v5-stable-newstats' into v5-devel
Conflicts:
ChangeLog
action.c
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/nsd_gtls.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index 15340738..e1192aaf 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -119,7 +119,7 @@ readFile(uchar *pszFile, gnutls_datum_t *pBuf) pBuf->data = NULL; - if((fd = open((char*)pszFile, 0)) == -1) { + if((fd = open((char*)pszFile, O_RDONLY)) == -1) { errmsg.LogError(0, RS_RET_FILE_NOT_FOUND, "can not read file '%s'", pszFile); ABORT_FINALIZE(RS_RET_FILE_NOT_FOUND); @@ -208,10 +208,14 @@ finalize_it: if(iRet != RS_RET_OK) { if(data.data != NULL) free(data.data); - if(pThis->bOurCertIsInit) + if(pThis->bOurCertIsInit) { gnutls_x509_crt_deinit(pThis->ourCert); - if(pThis->bOurKeyIsInit) + pThis->bOurCertIsInit = 0; + } + if(pThis->bOurKeyIsInit) { gnutls_x509_privkey_deinit(pThis->ourKey); + pThis->bOurKeyIsInit = 0; + } } RETiRet; } |