Skip to content

Commit

Permalink
Fix memory leak when cleaning all shared subs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralight committed Apr 30, 2020
1 parent ea47f6b commit 4392320
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/subs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4392320

Please sign in to comment.