mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-05-21 12:24:29 +02:00
Don't derefence NULLs.
This commit is contained in:
parent
7746427b07
commit
065c6356d4
|
|
@ -547,6 +547,9 @@ int mqtt3_subs_clean_session(struct mosquitto_db *db, struct mosquitto *context)
|
|||
struct _mosquitto_subleaf *leaf;
|
||||
|
||||
for(i=0; i<context->sub_count; i++){
|
||||
if(context->subs[i] == NULL){
|
||||
continue;
|
||||
}
|
||||
leaf = context->subs[i]->subs;
|
||||
while(leaf){
|
||||
if(leaf->context==context){
|
||||
|
|
|
|||
Loading…
Reference in a new issue