summaryrefslogtreecommitdiff
path: root/src/basic/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/util.c')
-rw-r--r--src/basic/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index 737f2a221c..f01f5f237b 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -6095,6 +6095,9 @@ int openpt_in_namespace(pid_t pid, int flags) {
if (master < 0)
_exit(EXIT_FAILURE);
+ if (unlockpt(master) < 0)
+ _exit(EXIT_FAILURE);
+
cmsg = CMSG_FIRSTHDR(&mh);
cmsg->cmsg_level = SOL_SOCKET;
cmsg->cmsg_type = SCM_RIGHTS;