diff --git a/src/opnsense/mvc/app/library/OPNsense/Core/Config.php b/src/opnsense/mvc/app/library/OPNsense/Core/Config.php index e8ea68795..3d5ec0cae 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Core/Config.php +++ b/src/opnsense/mvc/app/library/OPNsense/Core/Config.php @@ -470,9 +470,10 @@ class Config extends Singleton // lock aquired, truncate and write new data ftruncate($fp, 0); fwrite($fp, $xml_text); - // flush and unlock + // flush, unlock and close file handler fflush($fp); flock($fp, LOCK_UN); + fclose($fp); } else { throw new ConfigException("Unable to lock config"); }