Fix FILE leak in error path.
authorclaudio <claudio@openbsd.org>
Tue, 13 Jun 2023 08:45:41 +0000 (08:45 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 13 Jun 2023 08:45:41 +0000 (08:45 +0000)
commit6f8f5de9637c2142a32ae0434b071b7a84ed90a6
tree489406b652ff3d54beb00ec736ca4b7d85e3ffeb
parent7f6870ef82a2c5f15c6bd27654923fce61abfcff
Fix FILE leak in error path.

If flowf is NULL then fclose(spif) must be called.
Split up the error check from if (spif == NULL || flowf == NULL) to
individual checks since that is easier to read.

Noticed by markus@, OK tb@
sbin/iked/ikev2.c