From fdc39edfd8de563debd59de993799be235b8ef2e Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 7 Sep 2015 16:41:25 -0700 Subject: [PATCH] Fix AllocTemporary on *nix. --- src/unix/unixutil.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unix/unixutil.cpp b/src/unix/unixutil.cpp index 598d2b8..a12dbb7 100644 --- a/src/unix/unixutil.cpp +++ b/src/unix/unixutil.cpp @@ -66,6 +66,7 @@ void *AllocTemporary(size_t n) (AllocTempHeader *)malloc(n + sizeof(AllocTempHeader)); h->prev = NULL; h->next = Head; + if(Head) Head->prev = h; Head = h; memset(&h[1], 0, n); return (void *)&h[1];