You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2013/10/08 19:56:38 UTC
svn commit: r1530373 - in /qpid/trunk/qpid/extras/dispatch/src: message.c
python_embedded.c router_node.c router_pynode.c
Author: tross
Date: Tue Oct 8 17:56:37 2013
New Revision: 1530373
URL: http://svn.apache.org/r1530373
Log:
QPID-5216 - Fixed two memory leaks and one uninitialized-data bug.
Modified:
qpid/trunk/qpid/extras/dispatch/src/message.c
qpid/trunk/qpid/extras/dispatch/src/python_embedded.c
qpid/trunk/qpid/extras/dispatch/src/router_node.c
qpid/trunk/qpid/extras/dispatch/src/router_pynode.c
Modified: qpid/trunk/qpid/extras/dispatch/src/message.c
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/dispatch/src/message.c?rev=1530373&r1=1530372&r2=1530373&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/dispatch/src/message.c (original)
+++ qpid/trunk/qpid/extras/dispatch/src/message.c Tue Oct 8 17:56:37 2013
@@ -474,9 +474,11 @@ dx_parsed_field_t *dx_message_delivery_a
!dx_parse_is_map(content->parsed_delivery_annotations)) {
dx_field_iterator_free(da);
dx_parse_free(content->parsed_delivery_annotations);
+ content->parsed_delivery_annotations = 0;
return 0;
}
+ dx_field_iterator_free(da);
return content->parsed_delivery_annotations;
}
Modified: qpid/trunk/qpid/extras/dispatch/src/python_embedded.c
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/dispatch/src/python_embedded.c?rev=1530373&r1=1530372&r2=1530373&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/dispatch/src/python_embedded.c (original)
+++ qpid/trunk/qpid/extras/dispatch/src/python_embedded.c Tue Oct 8 17:56:37 2013
@@ -467,6 +467,11 @@ static void dx_io_rx_handler(void *conte
Py_DECREF(pValue);
}
sys_mutex_unlock(lock);
+
+ dx_field_iterator_free(ap);
+ dx_field_iterator_free(body);
+ dx_parse_free(ap_map);
+ dx_parse_free(body_map);
}
Modified: qpid/trunk/qpid/extras/dispatch/src/router_node.c
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/dispatch/src/router_node.c?rev=1530373&r1=1530372&r2=1530373&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/dispatch/src/router_node.c (original)
+++ qpid/trunk/qpid/extras/dispatch/src/router_node.c Tue Oct 8 17:56:37 2013
@@ -585,8 +585,10 @@ static void router_rx_handler(void* cont
//
// Invoke the in-process handler now that the lock is released.
//
- if (handler)
+ if (handler) {
handler(handler_context, in_process_copy, rlink->mask_bit);
+ dx_free_message(in_process_copy);
+ }
}
Modified: qpid/trunk/qpid/extras/dispatch/src/router_pynode.c
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/extras/dispatch/src/router_pynode.c?rev=1530373&r1=1530372&r2=1530373&view=diff
==============================================================================
--- qpid/trunk/qpid/extras/dispatch/src/router_pynode.c (original)
+++ qpid/trunk/qpid/extras/dispatch/src/router_pynode.c Tue Oct 8 17:56:37 2013
@@ -68,13 +68,13 @@ static char *dx_add_router(dx_router_t *
// remote router is looked up.
//
addr = new_dx_address_t();
+ memset(addr, 0, sizeof(dx_address_t));
DEQ_ITEM_INIT(addr);
- addr->handler = 0;
- addr->handler_context = 0;
DEQ_INIT(addr->rlinks);
DEQ_INIT(addr->rnodes);
hash_insert(router->addr_hash, iter, addr, &addr->hash_handle);
DEQ_INSERT_TAIL(router->addrs, addr);
+ dx_field_iterator_free(iter);
//
// Create a router-node record to represent the remote router.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org