dlltool invalid free

This is a followup to commt 619f863c55 "dlltool memory leaks".
The name passed to def_name is freed, so if missing we can't just
use "".  strdup it.

	* defparse.y (opt_name): xstrdup empty string.
This commit is contained in:
Alan Modra
2025-06-10 22:57:46 +09:30
parent 2c0e910caf
commit 9efb7cdef4

View File

@@ -213,7 +213,7 @@ opt_name2: ID { $$ = $1; }
}
;
opt_name: opt_name2 { $$ =$1; }
| { $$=""; }
| { $$ = xstrdup (""); }
;
opt_ordinal: