Don't clobber passed GENERAL_NAME on error.

This commit is contained in:
Dr. Stephen Henson 2008-11-30 16:07:11 +00:00
parent 40ea9ff9e8
commit cef3e62d2b

View file

@ -527,7 +527,8 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
return gen;
err:
GENERAL_NAME_free(gen);
if (!out)
GENERAL_NAME_free(gen);
return NULL;
}