resource->types = calloc(1, sizeof(char*));
if (NULL == resource->types) {
ERR("calloc() Fail(%d)", errno);
+ free(resource);
+ OCDeleteACLList(oic_acl);
return NULL;
}
resource->types[0] = strdup(" ");
resource->interfaces = calloc(1, sizeof(char*));
if (NULL == resource->interfaces) {
ERR("calloc() Fail(%d)", errno);
+ free(resource->types[0]);
+ free(resource->types);
+ free(resource);
+ OCDeleteACLList(oic_acl);
return NULL;
}
resource->interfaces[0] = strdup(OC_RSRVD_INTERFACE_DEFAULT);