mercurial/osutil.c
changeset 31480 95be8b7181d3
parent 31477 b9dd03ed564f
child 31569 cc3ec3027695
--- a/mercurial/osutil.c	Thu Mar 09 12:09:31 2017 -0800
+++ b/mercurial/osutil.c	Wed Mar 15 20:43:12 2017 -0700
@@ -400,6 +400,8 @@
 	Py_XDECREF(stat);
 error_list:
 	closedir(dir);
+	/* closedir also closes its dirfd */
+	goto error_value;
 error_dir:
 #ifdef AT_SYMLINK_NOFOLLOW
 	close(dfd);