Handle identifier==NULL case.

This commit is contained in:
Roger A. Light 2021-04-28 09:21:50 +01:00
parent be78a26fe8
commit 501690d312

View File

@ -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;