Skip to content

Commit

Permalink
lexmem now freed after error
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminHThomas committed Jul 29, 2024
1 parent ad6a439 commit eb12de7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jteissie <jteissie@student.42.fr> +#+ +:+ +#+ */
/* By: bthomas <bthomas@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/25 13:43:42 by bthomas #+# #+# */
/* Updated: 2024/07/22 16:37:01 by jteissie ### ########.fr */
/* Updated: 2024/07/29 11:17:40 by bthomas ### ########.fr */
/* */
/* ************************************************************************** */

Expand Down Expand Up @@ -38,6 +38,7 @@ int tokenize_data(t_data *data)
lex_status = lexer(data);
if (lex_status == LEXER_ERROR)
{
free_lexmem(data);
throw_lexer_error(data);
return (PANIC);
}
Expand Down

0 comments on commit eb12de7

Please sign in to comment.