bfd: add tracing support to bfd-process
[vpp.git] / src / vnet / devices / af_packet / af_packet.c
index 10b0ff2..ec65bf6 100644 (file)
@@ -437,6 +437,7 @@ af_packet_queue_init (vlib_main_t *vm, af_packet_if_t *apif,
 
       tx_queue->next_tx_frame = 0;
       tx_queue->queue_id = queue_id;
+      tx_queue->is_tx_pending = 0;
       clib_spinlock_init (&tx_queue->lockp);
     }
 
@@ -679,8 +680,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;
 }