diff options
author | Thomas Habets <habets@google.com> | 2019-11-01 14:26:31 +0000 |
---|---|---|
committer | Thomas Habets <habets@google.com> | 2019-11-01 14:26:31 +0000 |
commit | 9d12798cdf830a04b663e1db0889c8765ef86052 (patch) | |
tree | 620e83d5112328e03e760a5ba388ae086309b770 | |
parent | df25403a68d926f25ecf93cc9b9ea71744791cb6 (diff) | |
download | arping-9d12798cdf830a04b663e1db0889c8765ef86052.tar.gz |
Alloc a whole libnet_t in mock
-rw-r--r-- | src/mock_libnet.c | 2 |
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; } |