Skip to content

Commit

Permalink
Handle identifier==NULL case.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Apr 28, 2021
1 parent be78a26 commit 501690d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ int mosquitto_callback_unregister(
struct mosquitto__callback **cb_base = NULL;
struct mosquitto__security_options *security_options;

if(cb_func == NULL) return MOSQ_ERR_INVAL;
if(identifier == NULL || cb_func == NULL){
return MOSQ_ERR_INVAL;
}

if(identifier->listener == NULL){
security_options = &db.config->security_options;
Expand Down

0 comments on commit 501690d

Please sign in to comment.