diff options
author | Ermal <eri@pfsense.org> | 2012-05-22 19:17:59 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-05-22 19:17:59 +0000 |
commit | 66c189129c2435abf8d205f4152daed3a1827648 (patch) | |
tree | ae42c4297b1e3b2db8fe37244a66c84a24ea2960 | |
parent | 26c31b86ed36324893127b70b138f7c4f874ae0d (diff) | |
download | pfsense-66c189129c2435abf8d205f4152daed3a1827648.zip pfsense-66c189129c2435abf8d205f4152daed3a1827648.tar.gz |
Unlock if error occurs
-rw-r--r-- | etc/inc/captiveportal.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 67ef7c7..af6cd07 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -1242,8 +1242,11 @@ function captiveportal_write_db($cpdb, $locked = false, $remove = false) { else unset($cpdb[$key]); } - } else + } else { + if ($locked == false) + unlock($cpdblck); return; //This makes sure no record removal calls + } } $fd = @fopen("{$g['vardb_path']}/captiveportal.db", "w"); if ($fd) { |