audio_meta_h audio_h = NULL;
char* tmpStr = NULL;
int tmpValue;
+ bool ret;
sinfo = new CSongInfo;
+ if (!sinfo) {
+ _ERR("Memory alloc failed");
+ return false;
+ }
- sinfo->Create();
- if (!sinfo)
+ ret = sinfo->Create();
+ if (!ret) {
+ _ERR("CSongInfo creation failed");
+ delete sinfo;
return false;
+ }
if (media_info_get_file_path(md_h, &tmpStr)
!= MEDIA_CONTENT_ERROR_NONE) {
bool ret;
finfo = new CFolderInfo;
- if (!finfo)
+ if (!finfo) {
+ _ERR("Memory alloc failed");
return false;
+ }
ret = finfo->Create();
if (!ret) {
+ _ERR("CFolderInfo creation failed");
delete finfo;
return false;
}
bool ret;
alinfo = new CAlbumInfo;
- if (!alinfo)
+ if (!alinfo) {
+ _ERR("Memory alloc failed");
return false;
+ }
ret = alinfo->Create();
if (!ret) {
+ _ERR("CAlbumInfo creation failed");
delete alinfo;
return false;
}
CCategoryInfo *catinfo = NULL;
char *tmpStr;
int tmpValue;
+ bool ret;
if (!ph)
return false;
catinfo = new CCategoryInfo;
- if (!catinfo)
+ if (!catinfo) {
+ _ERR("Memory alloc failed");
return false;
+ }
+
+ ret = catinfo->Create();
+ if (!ret) {
+ _ERR("CCategoryInfo Create failed");
+ delete catinfo;
+ return false;
+ }
if (media_playlist_get_name(ph, &tmpStr) !=
MEDIA_CONTENT_ERROR_NONE) {