Skip to content

Commit b86fcda

Browse files
added an if check to ensure NULL values didn't fall in
1 parent ebe598e commit b86fcda

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

code/logic/mocking.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ void fossil_mock_init(MockCallList *list) {
2525
}
2626

2727
void fossil_mock_destroy(MockCallList *list) {
28+
if (!list) {
29+
return;
30+
}
31+
2832
MockCall *current = list->head;
2933
while (current) {
3034
MockCall *next = current->next;

0 commit comments

Comments
 (0)