Replaced afprintf usage with std::string to fix memory leak and improve portability of code.

This commit is contained in:
Robert Osfield 2010-04-28 10:15:16 +00:00
parent 7fb49c6d2f
commit dfda4ce35f

View File

@ -326,9 +326,8 @@ class ReaderWriterXine : public osgDB::ReaderWriter
const char* user_home = xine_get_homedir();
if(user_home)
{
char* cfgfile = NULL;
int result = asprintf(&(cfgfile), "%s/.xine/config", user_home);
if (result>0) xine_config_load(_xine, cfgfile);
std::string configFile(std::string(user_home)+"/.xine/config");
xine_config_load(_xine, configFile.c_str());
}
xine_init(_xine);