projects
/
platform
/
core
/
api
/
wifi-aware.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
119b6a1
)
Fix type used for malloc
author
Cheoleun Moon
<chleun.moon@samsung.com>
Thu, 2 Apr 2020 06:45:40 +0000
(15:45 +0900)
committer
Cheoleun Moon
<chleun.moon@samsung.com>
Thu, 2 Apr 2020 06:45:40 +0000
(15:45 +0900)
src/wifi-aware-peer.c
patch
|
blob
|
history
diff --git
a/src/wifi-aware-peer.c
b/src/wifi-aware-peer.c
index
4169826
..
f67c332
100644
(file)
--- a/
src/wifi-aware-peer.c
+++ b/
src/wifi-aware-peer.c
@@
-101,7
+101,7
@@
unsigned int _wifi_aware_peer_get_id(wifi_aware_peer_h peer)
int _wifi_aware_peer_get_mac(wifi_aware_peer_h peer, unsigned char **mac)
{
- *mac = (unsigned char *)g_try_malloc0(sizeof(unsigned char
*
) * WIFI_AWARE_MAC_ADDRESS_LEN);
+ *mac = (unsigned char *)g_try_malloc0(sizeof(unsigned char) * WIFI_AWARE_MAC_ADDRESS_LEN);
RET_VAL_IF(mac == NULL, WIFI_AWARE_ERROR_OUT_OF_MEMORY, "g_try_malloc0 failed");
wifi_aware_peer_s *handle = (wifi_aware_peer_s *)peer;
memcpy(*mac, handle->mac, WIFI_AWARE_MAC_ADDRESS_LEN);