Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
Change-Id: I7ae7337a60964a03e448008c6ff7c8c98d6cd461
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} pthread "-ldl")
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib/nfc)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} pthread "-ldl")
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib/nfc)
Name: nfc-plugin-emul
Summary: NFC emul plugin
Name: nfc-plugin-emul
Summary: NFC emul plugin
Release: 0
Group: TO_BE/FILLED_IN
License: Apache-2.0
Release: 0
Group: TO_BE/FILLED_IN
License: Apache-2.0
_net_nfc_store_ndef_message(&rawdata);
_net_nfc_store_ndef_message(&rawdata);
+ _nfc_emul_util_free_mem(rawdata.buffer);
+
DEBUG_EMUL_END();
return retval;
DEBUG_EMUL_END();
return retval;
- if(emul_msg != NULL && emul_msg->file_data != NULL)
- free(emul_msg->file_data);
+ if(emul_msg->file_data != NULL)
+ free(emul_msg->file_data);
+
if(rawdata.length > 0)
memcpy(temp, rawdata.buffer, rawdata.length);
if(rawdata.length > 0)
memcpy(temp, rawdata.buffer, rawdata.length);
+ _nfc_emul_util_free_mem(rawdata.buffer);
+
data_s rawdata = { NULL, 0 };
_net_nfc_retrieve_ndef_message(&rawdata);
data_s rawdata = { NULL, 0 };
_net_nfc_retrieve_ndef_message(&rawdata);
+ _nfc_emul_util_free_mem(rawdata.buffer);
if (emul_msg->record_count == 0 || rawdata.length == 0)
{
if (emul_msg->record_count == 0 || rawdata.length == 0)
{
DEBUG_EMUL_BEGIN();
_net_nfc_retrieve_ndef_message(&rawdata);
DEBUG_EMUL_BEGIN();
_net_nfc_retrieve_ndef_message(&rawdata);
+ _nfc_emul_util_free_mem(rawdata.buffer);
if (_net_nfc_emul_get_is_tag_attached())
{
if (_net_nfc_emul_get_is_tag_attached())
{
*result = _net_nfc_retrieve_ndef_message(&rawdata);
if(*result != NET_NFC_OK)
*result = _net_nfc_retrieve_ndef_message(&rawdata);
if(*result != NET_NFC_OK)
+ {
+ _nfc_emul_util_free_mem(rawdata.buffer);
real_data_size = rawdata.length;
real_data_size = rawdata.length;
{
DEBUG_ERR_MSG("read ndef_msg is failed >>> real_data_size is zero");
*result = NET_NFC_NO_NDEF_MESSAGE;
{
DEBUG_ERR_MSG("read ndef_msg is failed >>> real_data_size is zero");
*result = NET_NFC_NO_NDEF_MESSAGE;
+ _nfc_emul_util_free_mem(rawdata.buffer);
if(*data == NULL)
{
*result = NET_NFC_ALLOC_FAIL;
if(*data == NULL)
{
*result = NET_NFC_ALLOC_FAIL;
+ _nfc_emul_util_free_mem(rawdata.buffer);
{
free(*data);
*result = NET_NFC_ALLOC_FAIL;
{
free(*data);
*result = NET_NFC_ALLOC_FAIL;
+ _nfc_emul_util_free_mem(rawdata.buffer);
return false;
}
/* copy rawdata to data->buffer */
memcpy((*data)->buffer, rawdata.buffer, real_data_size);
return false;
}
/* copy rawdata to data->buffer */
memcpy((*data)->buffer, rawdata.buffer, real_data_size);
+ _nfc_emul_util_free_mem(rawdata.buffer);