xbmc/xbmc — pull request #594 by CrystalP (2011-12-29 01:19:41+00:00)
Title: [WIN] fix crash when ejecting an audio CD

Probably happening since libcdio is not in-tree anymore, and compiled as a mingw dll.
The strings in the cdtext structures returned by libcdio are duplicated in XBMC with strdup() but freed with libcdio, which has a different memory allocator, causing a memory exception.

This PR replaces the cdtext_init/cdtext_destroy functions with new xbmc_ functions to make it clear that allocation/destruction belongs to XBMC.

The smaller fix (but less clear I think) would be to only replace the cdtext_destroy calls with free() loops.