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
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to