projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
23120b1
)
net: Fuse g_malloc(); memset() into g_new0()
author
Markus Armbruster
<armbru@redhat.com>
Thu, 4 Dec 2014 13:28:16 +0000
(14:28 +0100)
committer
Stefan Hajnoczi
<stefanha@redhat.com>
Fri, 19 Dec 2014 13:17:02 +0000
(13:17 +0000)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
net/l2tpv3.c
patch
|
blob
|
history
diff --git
a/net/l2tpv3.c
b/net/l2tpv3.c
index 3b805a7a4cfb053fb50810af2337822ae574df0a..6014c43eff3293c568c8fcff8f1bb62502956442 100644
(file)
--- a/
net/l2tpv3.c
+++ b/
net/l2tpv3.c
@@
-695,8
+695,7
@@
int net_init_l2tpv3(const NetClientOptions *opts,
goto outerr;
}
- s->dgram_dst = g_malloc(sizeof(struct sockaddr_storage));
- memset(s->dgram_dst, '\0' , sizeof(struct sockaddr_storage));
+ s->dgram_dst = g_new0(struct sockaddr_storage, 1);
memcpy(s->dgram_dst, result->ai_addr, result->ai_addrlen);
s->dst_size = result->ai_addrlen;