summaryrefslogtreecommitdiff
path: root/src/irmd/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r--src/irmd/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c
index f3a3ff87..19875d1c 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -844,6 +844,11 @@ static int unbind_program(char * prog,
prog_table_del(&irmd.prog_table, prog);
else {
struct prog_entry * en = prog_table_get(&irmd.prog_table, prog);
+ if (en == NULL) {
+ pthread_rwlock_unlock(&irmd.reg_lock);
+ return -EINVAL;
+ }
+
prog_entry_del_name(en, name);
e = registry_get_entry(&irmd.registry, name);