summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-05-22 19:17:59 +0000
committerErmal <eri@pfsense.org>2012-05-22 19:17:59 +0000
commit66c189129c2435abf8d205f4152daed3a1827648 (patch)
treeae42c4297b1e3b2db8fe37244a66c84a24ea2960 /etc
parent26c31b86ed36324893127b70b138f7c4f874ae0d (diff)
downloadpfsense-66c189129c2435abf8d205f4152daed3a1827648.zip
pfsense-66c189129c2435abf8d205f4152daed3a1827648.tar.gz
Unlock if error occurs
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/captiveportal.inc5
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) {
OpenPOWER on IntegriCloud