rte_free(uio_res);
/* close fd if in primary process */
- close(rte_intr_fd_get(dev->intr_handle));
+ if (rte_intr_fd_get(dev->intr_handle) >= 0)
+ close(rte_intr_fd_get(dev->intr_handle));
+
if (rte_intr_dev_fd_get(dev->intr_handle) >= 0) {
close(rte_intr_dev_fd_get(dev->intr_handle));
rte_intr_dev_fd_set(dev->intr_handle, -1);