channels/rdpdr: replace usage of strndup