fix alloc between two allocations, fix free (uninitialized value)

This commit is contained in:
2024-12-01 19:22:43 +01:00
parent 7cddc28d28
commit a15705401e
3 changed files with 20 additions and 5 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/30 18:46:07 by tomoron #+# #+# */
/* Updated: 2024/12/01 03:16:19 by tomoron ### ########.fr */
/* Updated: 2024/12/01 18:47:12 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -54,6 +54,7 @@ int free_prealloc(t_alloc *alloc, t_mem_bloc **main_bloc, size_t size)
t_mem_bloc *bloc;
t_alloc *prev;
prev = 0;
bloc = get_alloc_bloc(alloc, *main_bloc, size);
if(!bloc)
return(0);