Fix memory leak in caqueueingthread
Fix memory leak in caqueueingthread

free preallocated memory on failure and return CA_MEMORY_ALLOC_FAILED. 

Change-Id: I9f5b9591b96d9dd0bf96bbaf7e9c5a6407ad831e
Signed-off-by: Chetan Toshniwal <feb25d9056c77404cf8d926e7257a2d9a8ffffb8@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1671
Reviewed-by: Erich Keane <ec9f61fe526c14bb62c55d7c978f025ee6b3583d@intel.com>
Tested-by: jenkins-iotivity <09cb29e8a2b473a2c978382eec13ee06fa017bda@opendaylight.org>

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