Repository: qpid-proton Updated Branches: refs/heads/master cfa366356 -> a85c89ac8
WIP: Fix connection_driver refcount for collector Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/432fcb5c Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/432fcb5c Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/432fcb5c Branch: refs/heads/master Commit: 432fcb5c1ae239f6ad0de8c0f3c45f9a2e11529e Parents: cfa3663 Author: Alan Conway <[email protected]> Authored: Thu Mar 23 17:31:55 2017 -0400 Committer: Alan Conway <[email protected]> Committed: Thu Mar 23 17:31:55 2017 -0400 ---------------------------------------------------------------------- proton-c/src/core/connection_driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/432fcb5c/proton-c/src/core/connection_driver.c ---------------------------------------------------------------------- diff --git a/proton-c/src/core/connection_driver.c b/proton-c/src/core/connection_driver.c index b4d8178..f5fddae 100644 --- a/proton-c/src/core/connection_driver.c +++ b/proton-c/src/core/connection_driver.c @@ -57,6 +57,7 @@ int pn_connection_driver_init(pn_connection_driver_t* d, pn_connection_t *c, pn_ return PN_OUT_OF_MEMORY; } pn_connection_collect(d->connection, collector); + pn_decref(collector); return 0; } @@ -71,8 +72,10 @@ void pn_connection_driver_destroy(pn_connection_driver_t *d) { } if (d->connection) { pn_collector_t *collector = pn_connection_collector(d->connection); + if (collector) { + pn_collector_release(collector); + } pn_connection_free(d->connection); - pn_collector_free(collector); } memset(d, 0, sizeof(*d)); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
