diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index 41540c0f..796e6f25 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -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); }