Skip to content

[CHORE] Avoid misleading ft_free_and_null()s#279

Merged
LeaYeh merged 1 commit intomainfrom
chore-avoid-misleading-frees
Mar 24, 2024
Merged

[CHORE] Avoid misleading ft_free_and_null()s#279
LeaYeh merged 1 commit intomainfrom
chore-avoid-misleading-frees

Conversation

@itislu
Copy link
Collaborator

@itislu itislu commented Mar 22, 2024

All the calls to ft_free_and_null() would just set the local pointer of the freeing function to NULL.
This might give a false sense of safety that the pointer that gets put as an argument also gets set to NULL.

This new PR only changes those ft_free_and_null()s back to free() that make no difference to signal interrupt behavior.

@itislu itislu added the chore A routine task label Mar 22, 2024
All the calls to ft_free_and_null would just set the local pointer of the freeing function to NULL.
This might give a false sense of safety that the pointer that gets put as an argument also gets set to NULL.
@itislu itislu force-pushed the chore-avoid-misleading-frees branch from 22f6e2e to e95be6d Compare March 23, 2024 18:29
@LeaYeh LeaYeh merged commit 79d3e85 into main Mar 24, 2024
@LeaYeh LeaYeh deleted the chore-avoid-misleading-frees branch March 24, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore A routine task

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants