Browse Source

[enh] free memory for 'pwd' call.

Moul 3 years ago
parent
commit
4726ff2de8
2 changed files with 2 additions and 2 deletions
  1. 1 1
      libft.h
  2. 1 1
      src/ft_assign_free_str.c

+ 1 - 1
libft.h

@@ -63,7 +63,7 @@ void				*ft_memalloc(size_t size);
 void				ft_memdel(void **ap);
 char				*ft_strnew(size_t size);
 void				ft_strdel(char **as);
-char				*ft_assign_free_str(char *str, char *(*f)(const char*));
+char				*ft_assign_free_str(char *str, void *(*f)(const char*));
 void				ft_strclr(char *s);
 void				ft_striter(char *s, void (*f)(char *));
 void				ft_striteri(char *s, void (*f)(unsigned int, char *));

+ 1 - 1
src/ft_assign_free_str.c

@@ -18,7 +18,7 @@
 ** return new value
 */
 
-char	*ft_assign_free_str(char *str, char *(*f)(const char*))
+char	*ft_assign_free_str(char *str, void *(*f)(const char*))
 {
 	char	*tmp;