summaryrefslogtreecommitdiff
path: root/src/shared/pty.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-23 02:02:08 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-23 03:26:24 +0100
commit611b312b7d0799281347374dc303c73a066cedf8 (patch)
tree1aa9658c0088b4effdb6664312ece1005fd3177a /src/shared/pty.c
parentee451d766a64117a41ec36dd71e61683c9d9b83c (diff)
nspawn,pty: port over to new ptsname_malloc() helper
Diffstat (limited to 'src/shared/pty.c')
-rw-r--r--src/shared/pty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/pty.c b/src/shared/pty.c
index 52a426c0e1..6863be654e 100644
--- a/src/shared/pty.c
+++ b/src/shared/pty.c
@@ -194,13 +194,13 @@ int pty_get_fd(Pty *pty) {
}
int pty_make_child(Pty *pty) {
- char slave_name[1024];
+ _cleanup_free_ char *slave_name = NULL;
int r, fd;
assert_return(pty, -EINVAL);
assert_return(pty_is_unknown(pty), -EALREADY);
- r = ptsname_r(pty->fd, slave_name, sizeof(slave_name));
+ r = ptsname_malloc(pty->fd, &slave_name);
if (r < 0)
return -errno;