summaryrefslogtreecommitdiffstats
path: root/src/sighook.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-05-25 11:54:14 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-05-25 11:54:14 -0400
commit598422e7678a719b37cc4221c637b840f4e13fcc (patch)
tree320093f34c26879f63b5567936161d51e34355c3 /src/sighook.c
parent2b72ce2ac0908dae4a39d30b91a28106928168b0 (diff)
downloadbfs-598422e7678a719b37cc4221c637b840f4e13fcc.tar.xz
sighook: Allow sigunhook(NULL)
Diffstat (limited to 'src/sighook.c')
-rw-r--r--src/sighook.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sighook.c b/src/sighook.c
index ff5b96f..ece8147 100644
--- a/src/sighook.c
+++ b/src/sighook.c
@@ -584,6 +584,10 @@ done:
}
void sigunhook(struct sighook *hook) {
+ if (!hook) {
+ return;
+ }
+
mutex_lock(&sigmutex);
struct rcu *rcu = hook->sig ? &rcu_sighooks : &rcu_exithooks;