From: Ondřej Kuzník Date: Wed, 8 Sep 2021 13:20:31 +0000 (+0100) Subject: ITS#6949 Save errno X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc6b6276fcc3eb14162ae4adb55c26c39d4a0872;p=thirdparty%2Fopenldap.git ITS#6949 Save errno --- diff --git a/servers/slapd/logging.c b/servers/slapd/logging.c index 89405f827c..485387f8a1 100644 --- a/servers/slapd/logging.c +++ b/servers/slapd/logging.c @@ -123,8 +123,9 @@ logfile_open( const char *path ) return errno; if ( fstat( fd, &st ) ) { + int saved_errno = errno; close( fd ); - return errno; + return saved_errno; } if ( !logfile_path[0] ) {