summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Habets <habets@google.com>2019-11-01 14:26:31 +0000
committerThomas Habets <habets@google.com>2019-11-01 14:26:31 +0000
commit9d12798cdf830a04b663e1db0889c8765ef86052 (patch)
tree620e83d5112328e03e760a5ba388ae086309b770
parentdf25403a68d926f25ecf93cc9b9ea71744791cb6 (diff)
downloadarping-9d12798cdf830a04b663e1db0889c8765ef86052.tar.gz
Alloc a whole libnet_t in mock
-rw-r--r--src/mock_libnet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mock_libnet.c b/src/mock_libnet.c
index 2e56950..9cb34f7 100644
--- a/src/mock_libnet.c
+++ b/src/mock_libnet.c
@@ -24,7 +24,7 @@ libnet_init(int injection_type, LIBNET_INIT_CONST char *device, char *err_buf)
UNUSED(err_buf);
if (device == NULL) {
if (mock_libnet_null_ok) {
- return malloc(1);
+ return malloc(sizeof(libnet_t));
}
return NULL;
}