...
| Code Block |
|---|
for(p = head; p != NULL; p= p->next) { free(p); } |
Compliant Solution 1
To correct this error, a reference to p->next is stored in q before freeing p.
...
...
| Code Block |
|---|
for(p = head; p != NULL; p= p->next) { free(p); } |
To correct this error, a reference to p->next is stored in q before freeing p.
...