summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-05-22 19:18:47 +0000
committerErmal <eri@pfsense.org>2012-05-22 19:18:47 +0000
commit5c0b5f64f2f940e2e9fdea1b251c1fbd8a0cdf0c (patch)
treefcc34ef298d9c474fa577d72597f9639a978f8df /etc/inc
parent43d735deea71e4eb1fd0180a2e317018e371f6c6 (diff)
downloadpfsense-5c0b5f64f2f940e2e9fdea1b251c1fbd8a0cdf0c.zip
pfsense-5c0b5f64f2f940e2e9fdea1b251c1fbd8a0cdf0c.tar.gz
Unlock if error occurs
Diffstat (limited to 'etc/inc')
-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 54adf27..453a7be 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -1340,8 +1340,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_{$cpzone}.db", "w");
if ($fd) {
OpenPOWER on IntegriCloud