Fix Coverity Scan 1487012 Resource leak

pull/2505/head
Roger A. Light 4 years ago
parent b3096982b5
commit 27b4a6aa33

@ -115,7 +115,7 @@ static char *properties_to_json(const mosquitto_property *properties)
case MQTT_PROP_SERVER_REFERENCE:
case MQTT_PROP_REASON_STRING:
/* str */
if(mosquitto_property_read_string(properties, propid, &value, false)){
if(mosquitto_property_read_string(properties, propid, &value, false) == NULL){
cJSON_Delete(array);
return NULL;
}

Loading…
Cancel
Save