Fix Coverity 1486949
This commit is contained in:
parent
f44d8fad50
commit
5c3c5d779f
@ -100,6 +100,7 @@ int handle__pubackcomp(struct mosquitto *mosq, const char *type)
|
|||||||
&& reason_code != MQTT_RC_PAYLOAD_FORMAT_INVALID
|
&& reason_code != MQTT_RC_PAYLOAD_FORMAT_INVALID
|
||||||
){
|
){
|
||||||
|
|
||||||
|
mosquitto_property_free_all(&properties);
|
||||||
return MOSQ_ERR_PROTOCOL;
|
return MOSQ_ERR_PROTOCOL;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
@ -107,14 +108,13 @@ int handle__pubackcomp(struct mosquitto *mosq, const char *type)
|
|||||||
&& reason_code != MQTT_RC_PACKET_ID_NOT_FOUND
|
&& reason_code != MQTT_RC_PACKET_ID_NOT_FOUND
|
||||||
){
|
){
|
||||||
|
|
||||||
|
mosquitto_property_free_all(&properties);
|
||||||
return MOSQ_ERR_PROTOCOL;
|
return MOSQ_ERR_PROTOCOL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(mosq->in_packet.pos < mosq->in_packet.remaining_length){
|
if(mosq->in_packet.pos < mosq->in_packet.remaining_length){
|
||||||
#ifdef WITH_BROKER
|
|
||||||
mosquitto_property_free_all(&properties);
|
mosquitto_property_free_all(&properties);
|
||||||
#endif
|
|
||||||
return MOSQ_ERR_MALFORMED_PACKET;
|
return MOSQ_ERR_MALFORMED_PACKET;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user