summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2014-01-21 12:17:42 +0100
committerAndreas Schneider <asn@samba.org>2014-01-21 12:19:32 +0100
commit07ece110085e3846c40e0e7408c591546ed23e4a (patch)
treec1338cdff90055a481d5ff4c8b468dcf4367035e /src
parentb7ec347fca6b11a2297c4d637ec8d8d7b0aebfc6 (diff)
downloadsocket_wrapper-07ece110085e3846c40e0e7408c591546ed23e4a.tar.gz
socket_wrapper-07ece110085e3846c40e0e7408c591546ed23e4a.tar.xz
socket_wrapper-07ece110085e3846c40e0e7408c591546ed23e4a.zip
src: Make sure the memory is zeroed.
Diffstat (limited to 'src')
-rw-r--r--src/socket_wrapper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index c5b94fb..9aafa93 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -1463,7 +1463,10 @@ static uint8_t *swrap_packet_init(struct timeval *tval,
}
base = (uint8_t *)malloc(alloc_len);
- if (!base) return NULL;
+ if (base == NULL) {
+ return NULL;
+ }
+ memset(base, 0x0, alloc_len);
buf = base;