Fix Memory leak of getResourceType() in ocstack.c