https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123349
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
OPT_debuglib_ has the same bug.
Also:
if (defaultlib != NULL)
free (CONST_CAST (char *, defaultlib));
Can just be `free (CONST_CAST (char *, defaultlib));` without the null check.
free is a no-op for null.
