diff --git a/lib/nfs_v4.c b/lib/nfs_v4.c index ee740eb..3ff314e 100644 --- a/lib/nfs_v4.c +++ b/lib/nfs_v4.c @@ -2847,8 +2847,7 @@ nfs4_readlink_cb(struct rpc_context *rpc, int status, void *command_data, rlresok = &res->resarray.resarray_val[i].nfs_resop4_u.opreadlink.READLINK4res_u.resok4; - target = strndup(rlresok->link.utf8string_val, - rlresok->link.utf8string_len); + target = strdup(rlresok->link.utf8string_val); if (target == NULL) { data->cb(-ENOMEM, nfs, "Failed to allocate memory", data->private_data);