From: Mika Laitio Date: Thu, 17 Mar 2011 23:20:38 +0000 (+0200) Subject: memory leak fixes X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ecfaf91c2b482139fb750bd1a503f10f29c6991b;p=libplpbus.git memory leak fixes Signed-off-by: Mika Laitio --- diff --git a/src/plpbus/BusClient.cc b/src/plpbus/BusClient.cc index 75583fe..2ab2a2d 100644 --- a/src/plpbus/BusClient.cc +++ b/src/plpbus/BusClient.cc @@ -161,6 +161,7 @@ int BusClient::send_message_and_wait_response(const BusMessage *msg_req_param, B seq = (DataItemSequence *)msg_req_param->_dataItemSeq; _server->send_dataitem_message_and_wait_response(*seq, seq_rsp); *msg_rsp_param = new BusMessageInternal(*seq_rsp); + delete(seq_rsp); return 0; } diff --git a/src_test/test_admin.cc b/src_test/test_admin.cc index 5f2ba79..48fa970 100644 --- a/src_test/test_admin.cc +++ b/src_test/test_admin.cc @@ -17,5 +17,6 @@ int main(int argc, char** argv) client = new plpbus::BusClient(); client->init(argv[1]); client->request_shutdown(); + delete(client); return 0; }