X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=TP_8%2Fexo3%2Fexo3.c;fp=TP_8%2Fexo3%2Fexo3.c;h=6f9cb34c228bae34b4c0e72160e629e0bac04ccf;hb=0c2d94f5a32e95d2117d9204dbdd79d878c23b69;hp=2c433a5f90a7246ed3c3764167deea711528207e;hpb=5dd62128f45af0315965ab9a9cd734fc8fe73481;p=TD_C.git diff --git a/TP_8/exo3/exo3.c b/TP_8/exo3/exo3.c index 2c433a5..6f9cb34 100644 --- a/TP_8/exo3/exo3.c +++ b/TP_8/exo3/exo3.c @@ -57,7 +57,7 @@ int list_get(link_t* head, unsigned index) { void list_clear(link_t* link) { while (link != NULL) { - link_t* next_link = link; + link_t* next_link = link->next; free(link); link = next_link; }