remove my stupid init

This commit is contained in:
Jacek Jendrzej
2017-08-29 15:01:31 +02:00
parent 3987c3a306
commit c5dc1b7770

View File

@@ -836,7 +836,7 @@ void CRadioText::RassDecode(unsigned char *mtext, int len)
slidenumr = Rass_SlideFoto; slidenumr = Rass_SlideFoto;
} }
// //
char *filepath = asprintf(&filepath, "%s/Rass_%d.error", DataDir, slidenumr); char *filepath = NULL;
(filetype == 2) ? asprintf(&filepath, "%s/Rass_%d.def", DataDir, slidenumr) (filetype == 2) ? asprintf(&filepath, "%s/Rass_%d.def", DataDir, slidenumr)
: asprintf(&filepath, "%s/Rass_%d.mpg", DataDir, slidenumr); : asprintf(&filepath, "%s/Rass_%d.mpg", DataDir, slidenumr);
if ((fd = fopen(filepath, "wb")) != NULL) { if ((fd = fopen(filepath, "wb")) != NULL) {
@@ -881,7 +881,8 @@ void CRadioText::RassDecode(unsigned char *mtext, int len)
} }
else else
printf("ERROR vdr-radio: writing image/data-file failed '%s'", filepath); printf("ERROR vdr-radio: writing image/data-file failed '%s'", filepath);
free(filepath); if(filepath)
free(filepath);
} }
} }
start = false; start = false;