Hi Zoran,

The 'param' is stored in 'params' (in main() function).
So they are marked as 'still reachable', not memory leak.
I think we can ignore them.

BR,

Hung Nguyen - DEK Technologies


--------------------------------------------------------------------------------
From: Zoran Milinkovic [email protected]
Sent: Tuesday, June 14, 2016 4:17PM
To: Hung Nguyen, Neelakanta Reddy
     [email protected], [email protected]
Cc: Opensaf-devel
     [email protected]
Subject: RE: [PATCH 1 of 1] immtools: Fix memory leak in init_param() [#1876]


Hi Hung,

param->paramName alsp need to be freed.

Reviewed the patch.
Ack from me.

Thanks,
Zoran


-----Original Message-----
From: Hung Nguyen [mailto:[email protected]]
Sent: Tuesday, June 14, 2016 10:37 AM
To: Zoran Milinkovic <[email protected]>; 
[email protected]
Cc: [email protected]
Subject: [PATCH 1 of 1] immtools: Fix memory leak in init_param() [#1876]

  osaf/tools/safimm/immadm/imm_admin.c |  7 +++++--
  1 files changed, 5 insertions(+), 2 deletions(-)


Fix memory leak in init_param().

diff --git a/osaf/tools/safimm/immadm/imm_admin.c 
b/osaf/tools/safimm/immadm/imm_admin.c
--- a/osaf/tools/safimm/immadm/imm_admin.c
+++ b/osaf/tools/safimm/immadm/imm_admin.c
@@ -159,10 +159,13 @@ static int init_param(SaImmAdminOperatio
  
        param->paramBuffer = immutil_new_attrValue(param->paramType, attrValue);
  
-       if (param->paramBuffer == NULL)
-               return -1;
+       if (param->paramBuffer == NULL) {
+               res = -1;
+               goto done;
+       }
  
   done:
+       free(tmp);
        return res;
  }
  


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to