Close file descriptor before next try getting a good one.
authortobias <tobias@openbsd.org>
Fri, 17 Jan 2014 21:42:47 +0000 (21:42 +0000)
committertobias <tobias@openbsd.org>
Fri, 17 Jan 2014 21:42:47 +0000 (21:42 +0000)
ok millert@

libexec/mail.local/locking.c

index 735c846..a9a2a8d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: locking.c,v 1.10 2011/01/10 21:00:50 millert Exp $    */
+/*     $OpenBSD: locking.c,v 1.11 2014/01/17 21:42:47 tobias Exp $     */
 
 /*
  * Copyright (c) 1996-1998 Theo de Raadt <deraadt@theos.com>
@@ -112,6 +112,7 @@ again:
                                                seteuid(pw->pw_uid);
                                        }
                                }
+                               close(lfd);
                        }
                        sleep(1U << tries);
                        tries++;