diff options
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 366368630cb..a69ab5daa76 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -3487,7 +3487,7 @@ static int cmd_readlink(void) char *name= NULL; char *buf = NULL; char *targetname = NULL; - char linkname[PATH_MAX+1]; + char *linkname = NULL; struct cli_state *targetcli; NTSTATUS status; @@ -3519,7 +3519,7 @@ static int cmd_readlink(void) return 1; } - status = cli_posix_readlink(targetcli, name, linkname, PATH_MAX+1); + status = cli_posix_readlink(targetcli, name, talloc_tos(), &linkname); if (!NT_STATUS_IS_OK(status)) { d_printf("%s readlink on file %s\n", nt_errstr(status), name); @@ -3528,6 +3528,8 @@ static int cmd_readlink(void) d_printf("%s -> %s\n", name, linkname); + TALLOC_FREE(linkname); + return 0; } |