Undoing malloc for S_MusicName, pass music_name instead.

I don't think there's a reason for copying to a new var.
This commit is contained in:
mazmazz 2018-01-15 09:16:50 -05:00
parent 5e3e23c779
commit 074f43f377

View file

@ -1606,11 +1606,7 @@ boolean S_MusicPaused(void)
const char *S_MusicName(void)
{
//return music_name;
char *result = (char *)malloc(7);
strncpy(result, music_name, 7);
result[6] = 0;
return result;
return music_name;
}
boolean S_MusicExists(const char *mname, boolean checkMIDI, boolean checkDigi)