"tests/git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "fa1ac50a667feb4184258431ab539357d4789a6a"
Commit 0979a67a authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

dist/common: make sure peer struct is zeroed

parent d5d6e3d6
...@@ -89,6 +89,7 @@ bool NetPeerAdd(const char *path, bool dev) { ...@@ -89,6 +89,7 @@ bool NetPeerAdd(const char *path, bool dev) {
peer += peer_num; peer += peer_num;
peer_num++; peer_num++;
memset(peer, 0, sizeof(*peer));
if (!(peer->sock_path = strdup(path))) { if (!(peer->sock_path = strdup(path))) {
perror("NetPeerAdd: strdup failed"); perror("NetPeerAdd: strdup failed");
return false; return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment