From 6bf694161d810c1614ff06e597442d187e88ad28 Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 18 Aug 2021 23:26:49 +1000 Subject: freeSimList() don't do anything if sims isn't allocated. --- src/sledjchisl/sledjchisl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index dddd054..3e216c0 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -1366,6 +1366,9 @@ void freeSimList(simList *sims) { int i; + if (NULL == sims) + return; + for (i = 0; i < sims->num; i++) free(sims->sims[i]); free(sims->sims); -- cgit v1.1