summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-07-31 11:08:35 +0000
committerErmal <eri@pfsense.org>2012-07-31 11:08:35 +0000
commit712eb7695cba3fb727a3d748bc603a1af0f14001 (patch)
treefbf463fa869f624bcae0f4841c0b4d15a03bc0c1 /etc/inc/util.inc
parenteb295a1bcb98c3631ee579cdf7dc2150d6393453 (diff)
downloadpfsense-712eb7695cba3fb727a3d748bc603a1af0f14001.zip
pfsense-712eb7695cba3fb727a3d748bc603a1af0f14001.tar.gz
Unlock on return
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index ebbf702..881537f 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -203,6 +203,7 @@ function refcount_reference($reference) {
$shmid = @shmop_open($reference, "w", 0, 0);
if (!$shmid) {
log_error(gettext("Could not open shared memory {$reference}"));
+ unlock($shm_lck);
return;
}
}
@@ -227,6 +228,7 @@ function refcount_unreference($reference) {
if (!$shmid) {
refcount_init($reference);
log_error(gettext("Could not open shared memory {$reference}"));
+ unlock($shm_lck);
return;
}
$shm_data = @shmop_read($shmid, 0, 10);
OpenPOWER on IntegriCloud