ipacm: klock work issue
Updated change to handle buffer deallocation.
Change-Id: I19871b3b6a005f7981489ddcfc5348971262ba3c
diff --git a/ipacm/src/IPACM_Main.cpp b/ipacm/src/IPACM_Main.cpp
index fedfba6..011bdb4 100644
--- a/ipacm/src/IPACM_Main.cpp
+++ b/ipacm/src/IPACM_Main.cpp
@@ -457,6 +457,7 @@
if (data_ex == NULL)
{
IPACMERR("unable to allocate memory for event data\n");
+ free(event_ex);
continue;
}
data_ex->num_of_attribs = event_ex->num_of_attribs;
@@ -474,6 +475,8 @@
if(new_neigh_data == NULL)
{
IPACMERR("Failed to allocate memory.\n");
+ free(data_ex);
+ free(event_ex);
continue;
}
memset(new_neigh_data, 0, sizeof(ipacm_event_data_all));