diff --git a/test/unit/Makefile b/test/unit/Makefile index 4ad360f3..2c53615b 100644 --- a/test/unit/Makefile +++ b/test/unit/Makefile @@ -100,8 +100,11 @@ SUBS_OBJS = \ database.o \ memory_mosq.o \ memory_public.o \ + packet_datatypes.o \ + property_mosq.o \ subs.o \ - topic_tok.o + topic_tok.o \ + utf8_mosq.o \ all : test diff --git a/test/unit/keepalive_test.c b/test/unit/keepalive_test.c index faedad74..ef2288a9 100644 --- a/test/unit/keepalive_test.c +++ b/test/unit/keepalive_test.c @@ -180,6 +180,7 @@ static void TEST_100k_random_clients(void) db.now_s = 1000; db.config = calloc(1, sizeof(struct mosquitto__config)); if(db.config == NULL){ + free(contexts); return; } CU_ASSERT_PTR_NOT_NULL(db.config); @@ -194,6 +195,8 @@ static void TEST_100k_random_clients(void) rc = keepalive__init(); CU_ASSERT_EQUAL(rc, MOSQ_ERR_SUCCESS); if(rc != MOSQ_ERR_SUCCESS){ + free(contexts); + free(db.config); return; } CU_ASSERT_EQUAL(keepalive_list_max, 98303); diff --git a/test/unit/property_user_read.c b/test/unit/property_user_read.c index 43d3ae98..9d19b5d1 100644 --- a/test/unit/property_user_read.c +++ b/test/unit/property_user_read.c @@ -514,6 +514,8 @@ static void missing_read_helper(mosquitto_property *proplist) /* MISSING */ prop = mosquitto_property_read_string_pair(proplist, MQTT_PROP_USER_PROPERTY, &key, &value, false); + free(key); + free(value); CU_ASSERT_PTR_NULL(prop); } diff --git a/test/unit/subs_stubs.c b/test/unit/subs_stubs.c index 65f5ac25..9152d94c 100644 --- a/test/unit/subs_stubs.c +++ b/test/unit/subs_stubs.c @@ -100,15 +100,6 @@ uint16_t mosquitto__mid_generate(struct mosquitto *mosq) return ++mid; } -int mosquitto_property_add_varint(mosquitto_property **proplist, int identifier, uint32_t value) -{ - UNUSED(proplist); - UNUSED(identifier); - UNUSED(value); - - return MOSQ_ERR_SUCCESS; -} - int persist__backup(bool shutdown) { UNUSED(shutdown); @@ -121,11 +112,6 @@ int persist__restore(void) return MOSQ_ERR_SUCCESS; } -void mosquitto_property_free_all(mosquitto_property **properties) -{ - UNUSED(properties); -} - int retain__init(void) { return MOSQ_ERR_SUCCESS;