You'll want to malloc
the size of what your pointer is pointing to, not the size of the pointer itself. I.e: change
(node = malloc(sizeof(t_node *)))
to
(node = malloc(sizeof(t_node)))
or better yet:
(node = malloc(sizeof *node))
Then you don't have to change the malloc
-call if you decide to change the type of node
.