From: Tangles Date: Wed, 22 Jan 2020 14:39:00 +0000 (+1100) Subject: userprefs - fix linked list dangling pointer in readprefs X-Git-Tag: v1.6.1-roc-dev~33 X-Git-Url: https://skyeroc.xyz/gitweb/?a=commitdiff_plain;h=31861c0197b6e08cf1eb98d620dace223a5ee131;p=dgamelaunch userprefs - fix linked list dangling pointer in readprefs --- 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++; }