If you publish a work that contains a registered trademark but you sell it for free you shouldn't have any legal problems