diff options
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/devices/af_packet/af_packet.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/devices/af_packet/af_packet.c b/src/vnet/devices/af_packet/af_packet.c index 10b0ff2fb1a..83c10684c9f 100644 --- a/src/vnet/devices/af_packet/af_packet.c +++ b/src/vnet/devices/af_packet/af_packet.c @@ -679,8 +679,11 @@ error: fd2 = -1; } vec_free (host_if_name_dup); - memset (apif, 0, sizeof (*apif)); - pool_put (apm->interfaces, apif); + if (apif) + { + memset (apif, 0, sizeof (*apif)); + pool_put (apm->interfaces, apif); + } return ret; } |