mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-06-09 08:59:57 -04:00
dco_linux: properly close dco version file
Since we only call this once, it is not a bad leak, but still. Change-Id: Id85766738c3ece4f2d1860f7d101e4446a894aed Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20230512155023.444406-1-frank@lichtenheld.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg26650.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
This commit is contained in:
parent
f485074570
commit
cf496476b3
1 changed files with 2 additions and 0 deletions
|
|
@ -1020,6 +1020,7 @@ dco_version_string(struct gc_arena *gc)
|
|||
|
||||
if (!fgets(BSTR(&out), BCAP(&out), fp))
|
||||
{
|
||||
fclose(fp);
|
||||
return "ERR";
|
||||
}
|
||||
|
||||
|
|
@ -1031,6 +1032,7 @@ dco_version_string(struct gc_arena *gc)
|
|||
*nl = '\0';
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
return BSTR(&out);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue