Hi Zoran, Reviewed the patch. Ack from me.
BR, Hung Nguyen - DEK Technologies -------------------------------------------------------------------------------- From: Zoran Milinkovic zoran.milinko...@ericsson.com Sent: Thursday, May 19, 2016 6:30PM To: Neelakanta Reddy reddy.neelaka...@oracle.com Cc: Opensaf-devel opensaf-devel@lists.sourceforge.net Subject: [devel] [PATCH 1 of 1] imm: fix memory leaks in immnd_introduceMe and immnd_evt_proc_imm_resurrect [#1840] osaf/services/saf/immsv/immnd/immnd_evt.c | 1 + osaf/services/saf/immsv/immnd/immnd_proc.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletions(-) The patch fixes memory leaks in immnd_introduceMe and immnd_evt_proc_imm_resurrect, and releases allocated memory. diff --git a/osaf/services/saf/immsv/immnd/immnd_evt.c b/osaf/services/saf/immsv/immnd/immnd_evt.c --- a/osaf/services/saf/immsv/immnd/immnd_evt.c +++ b/osaf/services/saf/immsv/immnd/immnd_evt.c @@ -2222,6 +2222,7 @@ static uint32_t immnd_evt_proc_imm_resur if(cb->node_id != nodeId) { LOG_ER("Rejecting OM client resurrect from wrong node! %x", nodeId); + free(cl_node); error = SA_AIS_ERR_FAILED_OPERATION; goto agent_rsp; } diff --git a/osaf/services/saf/immsv/immnd/immnd_proc.c b/osaf/services/saf/immsv/immnd/immnd_proc.c --- a/osaf/services/saf/immsv/immnd/immnd_proc.c +++ b/osaf/services/saf/immsv/immnd/immnd_proc.c @@ -448,11 +448,15 @@ uint32_t immnd_introduceMe(IMMND_CB *cb) } if (!immnd_is_immd_up(cb)) { - return NCSCC_RC_FAILURE; + rc = NCSCC_RC_FAILURE; + goto error; } rc = immnd_mds_msg_send(cb, NCSMDS_SVC_ID_IMMD, cb->immd_mdest_id, &send_evt); + +error: free(mdirDup); + return rc; } ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel