From 9f9813aff4a3b0896b095510717a4ebae756a397 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Thu, 24 Mar 2022 14:10:19 +0000 Subject: [PATCH] Fix Coverity Scan 1486949 Resource leak --- lib/handle_pubackcomp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/handle_pubackcomp.c b/lib/handle_pubackcomp.c index 05f776be..58af3047 100644 --- a/lib/handle_pubackcomp.c +++ b/lib/handle_pubackcomp.c @@ -101,6 +101,7 @@ int handle__pubackcomp(struct mosquitto *mosq, const char *type) && reason_code != MQTT_RC_PAYLOAD_FORMAT_INVALID ){ + mosquitto_property_free_all(&properties); return MOSQ_ERR_PROTOCOL; } }else{ @@ -108,6 +109,7 @@ int handle__pubackcomp(struct mosquitto *mosq, const char *type) && reason_code != MQTT_RC_PACKET_ID_NOT_FOUND ){ + mosquitto_property_free_all(&properties); return MOSQ_ERR_PROTOCOL; } }