NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/52737 (bmake crash for invalid usage of .PATH)



Christos Zoulas <christos%zoulas.com@localhost> wrote:

> I'd rather unconditionally free "paths" if it was not NULL rather than add more complexity
> to the code. This function needs to be split up; it is too big and complicated.

That works for me, so diff is then just:

diff -r 6f103b9234c3 bmake/parse.c
--- a/bmake/parse.c	Sun Dec 30 09:28:02 2018 -0800
+++ b/bmake/parse.c	Tue Apr 09 10:42:04 2019 -0700
@@ -1768,7 +1768,8 @@
     }
 
 out:
-    assert(paths == NULL);
+    if (paths)
+	Lst_Destroy(paths, NULL);
     if (curTargs)
 	    Lst_Destroy(curTargs, NULL);
 }


Home | Main Index | Thread Index | Old Index