vault backup: 2024-11-19 21:02:30

This commit is contained in:
zleyyij 2024-11-19 21:02:30 -07:00
parent 743e1a320d
commit 35c54292c8

View File

@ -38,4 +38,10 @@ for (p = first; p != NULL; p = p->next)
free(p); free(p);
``` ```
The above loop won't function because it deallocates an entry, resulting The above loop won't function because it deallocates the entry, then attempts to access the pointer to the next item, *after* it's already been freed.
A functional example might look like this:
```c
struct entry* p = first;
```