Fix memory leak when cleaning all shared subs.

This commit is contained in:
Roger A. Light 2020-04-30 16:58:46 +01:00
parent ea47f6b0dc
commit 4392320bc3

View File

@ -190,6 +190,7 @@ static void sub__remove_shared_leaf(struct mosquitto__subhier *subhier, struct m
DL_DELETE(shared->subs, leaf);
if(shared->subs == NULL){
HASH_DELETE(hh, subhier->shared, shared);
mosquitto__free(shared->name);
mosquitto__free(shared);
}
mosquitto__free(leaf);