Fix Memory leak of getResourceType() in ocstack.c
Fix Memory leak of getResourceType() in ocstack.c

When memory allocation is failed, add free memory for already allocated memory.

Change-Id: I601367e7bfe3ff6a616d870636d5b535a32047fd
Signed-off-by: YW Sung <2b924e93d35f2adc31d3a11c20f63435d0d4ee01@samsung.com>
(cherry picked from commit ede5597d2740085e182a9f3f301873ec94ebba9c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/217
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>
Reviewed-by: Sudarshan Prasad <18992b2df49d20c769d3f89a8cc0a9f38a9dccaa@intel.com>

kartben/iotivity,kartben/iotivity,santais/iotivity_1.1,tienfuc/iotivity-democlient-snap,WojciechLuczkow/iotivity,santais/iotivity_1.1,rzr/iotivity,santais/iotivity_1.1.0,tienfuc/iotivity-democlient-snap,WojciechLuczkow/iotivity,tienfuc/iotivity-democlient-snap,tienfuc/iotivity-democlient-snap,iotivity/iotivity,kartben/iotivity,santais/iotivity,santais/iotivity_1.1,tienfuc/iotivity-democlient-snap,tienfuc/iotivity-democlient-snap,santais/iotivity_1.1,santais/iotivity_1.1.0,tienfuc/iotivity-democlient-snap,WojciechLuczkow/iotivity,tienfuc/iotivity-democlient-snap,iotivity/iotivity,WojciechLuczkow/iotivity,santais/iotivity_1.1,kartben/iotivity,iotivity/iotivity,santais/iotivity,santais/iotivity,santais/iotivity_1.1.0,rzr/iotivity,kartben/iotivity,santais/iotivity,iotivity/iotivity,santais/iotivity,rzr/iotivity,santais/iotivity,rzr/iotivity,santais/iotivity_1.1.0,rzr/iotivity,WojciechLuczkow/iotivity,rzr/iotivity,santais/iotivity,kartben/iotivity,rzr/iotivity,santais/iotivity_1.1.0,kartben/iotivity,WojciechLuczkow/iotivity,WojciechLuczkow/iotivity,iotivity/iotivity,WojciechLuczkow/iotivity,kartben/iotivity,santais/iotivity_1.1.0,santais/iotivity_1.1,iotivity/iotivity,iotivity/iotivity,santais/iotivity_1.1,santais/iotivity_1.1,iotivity/iotivity,santais/iotivity_1.1.0,tienfuc/iotivity-democlient-snap,tienfuc/iotivity-democlient-snap