diff options
Diffstat (limited to 'src/shared/pty.c')
-rw-r--r-- | src/shared/pty.c | 4 |
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; |