diff --git a/src/vertex.c b/src/vertex.c index 61e8472..4454872 100644 --- a/src/vertex.c +++ b/src/vertex.c @@ -41,6 +41,7 @@ void free_polygon(struct Vertex **head) } while(*head != NULL) { + // Double pointer so we can set the pointer itself to null. struct Vertex **temp = head; (*head) = (*head)->next; free(*temp);