Remove build warnings 40/62240/2
authorchleun.moon <chleun.moon@samsung.com>
Tue, 15 Mar 2016 04:37:17 +0000 (13:37 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Tue, 15 Mar 2016 05:12:09 +0000 (14:12 +0900)
Change-Id: I994f127448c3fd1f0dd79f9a7772d8923d4201c5
Signed-off-by: cheoleun <chleun.moon@samsung.com>
src/dns-sd/dns-sd.c

index 8b7d6e3..6600c2e 100644 (file)
@@ -1388,8 +1388,8 @@ int dnssd_service_get_all_txt_record(dnssd_service_h dnssd_service,
                reg = GET_REG_DATA_P(local_handle);
                txt_record = &(reg->txt_ref);
 
-               *value = TXTRecordGetBytesPtr(txt_record);
                *length = TXTRecordGetLength(txt_record);
+               *value = g_strndup(TXTRecordGetBytesPtr(txt_record), *length);
        }
 
        __DNSSD_LOG_FUNC_EXIT__;