projects
/
Libft.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fee90d
)
Fix freeing in a t_dict
author
Lukáš Jiřiště
<gymnazium.jiriste@gmail.com>
Sat, 2 Aug 2025 16:52:51 +0000
(18:52 +0200)
committer
Lukáš Jiřiště
<gymnazium.jiriste@gmail.com>
Sat, 2 Aug 2025 16:52:51 +0000
(18:52 +0200)
ft_struct/ft_dict_free.c
patch
|
blob
|
history
diff --git
a/ft_struct/ft_dict_free.c
b/ft_struct/ft_dict_free.c
index 86759b50fab16cbfcc9c8455922e43022bc350d7..48b5a6cd1c8ab82f393a1c8ec0e983d41a76b577 100644
(file)
--- a/
ft_struct/ft_dict_free.c
+++ b/
ft_struct/ft_dict_free.c
@@
-34,8
+34,10
@@
static void generic_free(void *composite)
key = composite;
element = (char *)composite + el_offset;
frees = handle_generic_free(0, NULL, NULL);
- frees[0](key);
- frees[1](element);
+ if (frees[0])
+ frees[0](key);
+ if (frees[1])
+ frees[1](element);
return ;
}