[Devel] autofs: fix leaked pid on error path in autofs4_fill_super

Submitted by Stanislav Kinsburskiy on Sept. 1, 2017, 10:30 a.m.

Details

Message ID 20170901103012.27298.19410.stgit@localhost.localdomain
State New
Series "autofs: fix leaked pid on error path in autofs4_fill_super"
Headers show

Commit Message

Stanislav Kinsburskiy Sept. 1, 2017, 10:30 a.m.
Check for protocol happens after pid get.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
---
 fs/autofs4/inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 0ba9c02..2cd4e7e 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -298,7 +298,7 @@  int autofs4_fill_super(struct super_block *s, void *data, int silent)
 		       "daemon (%d, %d) kernel (%d, %d)\n",
 			sbi->min_proto, sbi->max_proto,
 			AUTOFS_MIN_PROTO_VERSION, AUTOFS_MAX_PROTO_VERSION);
-		goto fail_dput;
+		goto fail_put_pid;
 	}
 
 	/* Establish highest kernel protocol version */