Avoid crash from trying to free an unallocated char*.

This commit is contained in:
John Ralls 2023-03-19 10:09:01 -07:00
parent 97f0653238
commit 0c3e85404d

View File

@ -180,7 +180,7 @@ m_version{}, m_sources{}, m_api_key{}
if (!(av_key && *av_key))
{
g_free (av_key);
av_key = getenv("ALPHAVANTAGE_API_KEY");
av_key = g_strdup(getenv("ALPHAVANTAGE_API_KEY"));
}
if (av_key)