From 31861c0197b6e08cf1eb98d620dace223a5ee131 Mon Sep 17 00:00:00 2001 From: Tangles Date: Thu, 23 Jan 2020 01:39:00 +1100 Subject: [PATCH] userprefs - fix linked list dangling pointer in readprefs --- dgamelaunch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dgamelaunch.c b/dgamelaunch.c index eea98ac..7cfa4ea 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -2219,6 +2219,7 @@ readprefs () *cpref = (struct userpref *)malloc(sizeof(struct userpref)); (*cpref)->name = strdup(nameptr); (*cpref)->value = strdup(valptr); + (*cpref)->npref = NULL; cpref = &(*cpref)->npref; prefcount++; } -- 2.47.3