-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed memory leak in map. Added panic_free in clean_up function
- Loading branch information
1 parent
492df5b
commit 7f136de
Showing
5 changed files
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: tsuchen <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/08/15 15:00:57 by jteissie #+# #+# */ | ||
/* Updated: 2024/08/29 11:29:05 by tsuchen ### ########.fr */ | ||
/* Updated: 2024/08/29 18:14:56 by tsuchen ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -43,6 +43,7 @@ typedef enum e_parse_status | |
|
||
int parse_map(t_data *data); | ||
char **build_map(t_data *data); | ||
void panic_free(char **array); | ||
t_bool is_invalid_char(char c); | ||
t_parse_status check_invalid_chars(char **map, size_t map_start); | ||
void fill_whitespaces(char **map); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: tsuchen <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/08/27 17:04:32 by jteissie #+# #+# */ | ||
/* Updated: 2024/08/29 15:50:27 by tsuchen ### ########.fr */ | ||
/* Updated: 2024/08/29 18:15:17 by tsuchen ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -43,5 +43,6 @@ int cleanup(t_data *data) | |
mlx_destroy_window(data->mlx, data->window); | ||
mlx_destroy_display(data->mlx); | ||
free(data->mlx); | ||
panic_free(data->map); | ||
exit(SUCCESS); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: tsuchen <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/08/27 17:03:43 by jteissie #+# #+# */ | ||
/* Updated: 2024/08/29 17:52:04 by tsuchen ### ########.fr */ | ||
/* Updated: 2024/08/29 18:17:15 by tsuchen ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: tsuchen <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/08/15 12:03:33 by tsuchen #+# #+# */ | ||
/* Updated: 2024/08/29 17:48:44 by tsuchen ### ########.fr */ | ||
/* Updated: 2024/08/29 18:10:59 by tsuchen ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters