]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#6949 Save errno
authorOndřej Kuzník <ondra@mistotebe.net>
Wed, 8 Sep 2021 13:20:31 +0000 (14:20 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Wed, 8 Sep 2021 15:53:02 +0000 (15:53 +0000)
servers/slapd/logging.c

index 89405f827cd781404db37b61547a3fce4230f321..485387f8a10343f97ae5a41294adab39e8dcd280 100644 (file)
@@ -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] ) {