Merge "media: release allocated strings on error" into lmp-dev