Skip to content

Commit 69c4aed

Browse files
authored
Merge pull request #15 from WonhongNam/patch-1
A bug in the Lines 83-85 in the previous version.
2 parents 6a8c5c7 + 4bb2da6 commit 69c4aed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Chapter_04_Stacks/StackWithLinkedLists.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ void deleteStack(struct Stack *stk){
8181
p = stk->top;
8282
while( p) {
8383
temp = p->next;
84-
p = p->next;
85-
free(temp);
84+
free(p);
85+
p = temp;
8686
}
8787
free(stk);
8888
}

0 commit comments

Comments
 (0)