fix: strdup a la con

This commit is contained in:
Gu://em_ 2026-01-30 21:27:23 +01:00
parent f721e6db72
commit b663655d53
2 changed files with 7 additions and 16 deletions

View file

@ -2,7 +2,6 @@
#include "ast_word.h"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -43,6 +42,8 @@ void ast_free_word(struct ast_word *ast_node)
if (ast_node == NULL)
return;
free(ast_node->word);
if (ast_node->word != NULL)
free(ast_node->word);
free(ast_node);
}