Github user astitcher commented on a diff in the pull request:
https://github.com/apache/qpid-proton/pull/119#discussion_r137036761
--- Diff: proton-c/src/proactor/libuv.c ---
@@ -1179,7 +1179,10 @@ pn_proactor_t *pn_proactor() {
pn_proactor_t *p = (pn_proactor_t*)calloc(1, sizeof(pn_proactor_t));
p->collector = pn_collector();
p->batch.next_event = &proactor_batch_next;
- if (!p->collector) return NULL;
+ if (!p->collector) {
+ free(p);
--- End diff --
Looks good to me, though stylistically I'd move line 1181 after the 'if'
statement.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]