Skip to content

Commit

Permalink
Fix incorrect memory tracking causing problems with memory_limit option.
Browse files Browse the repository at this point in the history
Closes #1437. Thanks to Guillaume Bour.
  • Loading branch information
ralight committed Oct 1, 2019
1 parent 093c8f9 commit b942b73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog.txt
@@ -1,6 +1,8 @@
Broker:
- Various fixes for `allow_zero_length_clientid` config, where this option was
not being set correctly. Closes #1429.
- Fix incorrect memory tracking causing problems with memory_limit option.
Closes #1437.

Client library:
- Fix publish properties not being passed to on_message_v5 callback for QoS 2
Expand Down
2 changes: 1 addition & 1 deletion src/subs.c
Expand Up @@ -684,7 +684,7 @@ struct mosquitto__subhier *sub__add_hier_entry(struct mosquitto__subhier *parent
}
child->parent = parent;
child->topic_len = len;
child->topic = malloc(len+1);
child->topic = mosquitto__malloc(len+1);
if(!child->topic){
child->topic_len = 0;
mosquitto__free(child);
Expand Down

0 comments on commit b942b73

Please sign in to comment.