Clean up structure allocation to follow best practices.
authorDoug Hudson <douglas.hudson@intel.com>
Tue, 8 Sep 2015 16:58:18 +0000 (09:58 -0700)
committerPatrick Lankswert <patrick.lankswert@intel.com>
Tue, 8 Sep 2015 17:37:31 +0000 (17:37 +0000)
Change-Id: Ia10b74926fce44cf0b55ed4964ea5f634e1c73d3
Signed-off-by: Doug Hudson <douglas.hudson@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2340
Reviewed-by: Joseph Morrow <joseph.l.morrow@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
resource/csdk/connectivity/common/src/uarraylist.c

index 17fce9a..8b175cd 100644 (file)
@@ -33,7 +33,7 @@
 
 u_arraylist_t *u_arraylist_create()
 {
-    u_arraylist_t *list = (u_arraylist_t *) OICMalloc(sizeof(u_arraylist_t));
+    u_arraylist_t *list = (u_arraylist_t *) OICCalloc(1, sizeof(u_arraylist_t));
     if (!list)
     {
         OIC_LOG(DEBUG, TAG, "Out of memory");