summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaekyun Lee <jkyun.lee@samsung.com>2013-04-04 18:36:08 +0900
committerJaekyun Lee <jkyun.lee@samsung.com>2013-04-08 16:49:13 +0900
commitc5284d2016000aba5d78b8f0e4f48c7bef4c6caa (patch)
tree25f56177be12343a35b6ff173bb16629ca1f39f5
parent9063aa267a0f7ec1eb07252594a9c638af3b5dc9 (diff)
downloadnfc-manager-neard-c5284d2016000aba5d78b8f0e4f48c7bef4c6caa.tar.gz
nfc-manager-neard-c5284d2016000aba5d78b8f0e4f48c7bef4c6caa.tar.bz2
nfc-manager-neard-c5284d2016000aba5d78b8f0e4f48c7bef4c6caa.zip
Add null check
Change-Id: Ibcc953193f0e80c8fe02ae7f3b56ca0f32024340
-rw-r--r--src/manager/net_nfc_service_test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/manager/net_nfc_service_test.c b/src/manager/net_nfc_service_test.c
index 84d1e1b..13ca811 100644
--- a/src/manager/net_nfc_service_test.c
+++ b/src/manager/net_nfc_service_test.c
@@ -73,10 +73,11 @@ void net_nfc_service_test_get_firmware_version(net_nfc_request_msg_t *msg)
resp.length = sizeof(net_nfc_response_firmware_version_t);
resp.flags = msg->flags;
resp.result = result;
- resp.data.length = data->length;
if (data != NULL)
{
+ resp.data.length = data->length;
+
net_nfc_send_response_msg(msg->client_fd, msg->request_type,
(void *)&resp, sizeof(net_nfc_response_firmware_version_t),
(void *)data->buffer, resp.data.length, NULL);