diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d1edee92a..41264dfa3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -3,6 +3,7 @@ D1X-Rebirth Changelog 20101204 -------- main/bmread.c, main/piggy.c: When setting a bogus sound in gamedata_read_tbl, don't let piggy_close free it. Fixes freeing of non-malloc'd pointer for PC shareware data +main/gamecntl.c: When calling do_game_pause do not allocate msg in Game mod GM_MULTI as it's not used nor freed 20101203 -------- diff --git a/main/gamecntl.c b/main/gamecntl.c index 45e07b1a3..24fae0271 100644 --- a/main/gamecntl.c +++ b/main/gamecntl.c @@ -280,10 +280,6 @@ int do_game_pause() char *msg; char total_time[9],level_time[9]; - MALLOC(msg, char, 1024); - if (!msg) - return 0; - #ifdef NETWORK if (Game_mode & GM_MULTI) { @@ -292,6 +288,10 @@ int do_game_pause() } #endif + MALLOC(msg, char, 1024); + if (!msg) + return 0; + songs_pause(); format_time(total_time, f2i(Players[Player_num].time_total) + Players[Player_num].hours_total*3600);