Protect against client->id NULL dereference.

This commit is contained in:
Roger A. Light 2014-10-16 23:06:47 +01:00
parent 065c6356d4
commit eb01459571

View file

@ -251,7 +251,7 @@ static int _sub_add(struct mosquitto_db *db, struct mosquitto *context, int qos,
int i;
if(!tokens){
if(context){
if(context && context->id){
leaf = subhier->subs;
last_leaf = NULL;
while(leaf){