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:
d24c606
)
Null check
author
Cheoleun Moon
<chleun.moon@samsung.com>
Thu, 2 Apr 2020 08:58:16 +0000
(17:58 +0900)
committer
Cheoleun Moon
<chleun.moon@samsung.com>
Thu, 2 Apr 2020 08:58:16 +0000
(17:58 +0900)
test/wifi-aware-test.c
patch
|
blob
|
history
diff --git
a/test/wifi-aware-test.c
b/test/wifi-aware-test.c
index
d3cd5af
..
8b723f9
100644
(file)
--- a/
test/wifi-aware-test.c
+++ b/
test/wifi-aware-test.c
@@
-603,6
+603,10
@@
static void __add_new_peer(wifi_aware_peer_h peer)
printf("New Peer %p is dicovered", peer);
peer_info *info = (peer_info *)g_try_malloc0(sizeof(peer_info));
+ if (info == NULL) {
+ printf("Out of memory\n");
+ return;
+ }
info->peer_id = g_peer_id++;
info->peer = peer;
g_peer_list = g_slist_append(g_peer_list, info);