aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-02-09 16:20:51 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:14 +0100
commit1730a8a10d8a13d9ad7bf1746adb08ecbe66e504 (patch)
treea009efbdb3d7cf776003289577033ad452120f57
parent4e446fece27480f7607fa89be3a919b70684ead6 (diff)
Don't free(NULL)
-rw-r--r--src/reflist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/reflist.c b/src/reflist.c
index dc37605b..e73ae2fa 100644
--- a/src/reflist.c
+++ b/src/reflist.c
@@ -112,6 +112,7 @@ static void recursive_free(Reflection *refl)
void reflist_free(RefList *list)
{
+ if ( list == NULL ) return;
recursive_free(list->head);
free(list);
}