repositories
/
TD_C.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5dd6212
)
TP_8 exo3: Fix the linked list freeing function to properly go to the next link.
author
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Tue, 28 Feb 2017 14:55:17 +0000
(15:55 +0100)
committer
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Tue, 28 Feb 2017 14:55:17 +0000
(15:55 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
TP_8/exo3/exo3.c
patch
|
blob
|
blame
|
history
diff --git
a/TP_8/exo3/exo3.c
b/TP_8/exo3/exo3.c
index 2c433a5f90a7246ed3c3764167deea711528207e..6f9cb34c228bae34b4c0e72160e629e0bac04ccf 100644
(file)
--- 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;
}