summaryrefslogtreecommitdiff
path: root/trafgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'trafgen.c')
-rw-r--r--trafgen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/trafgen.c b/trafgen.c
index 2897880..0996703 100644
--- a/trafgen.c
+++ b/trafgen.c
@@ -976,6 +976,10 @@ static void main_loop(struct ctx *ctx, char *confname, bool slow,
else
xmit_fastpath_or_die(ctx, cpu, orig_num);
+ dev_io_close(ctx->dev_out);
+ if (ctx->dev_in)
+ dev_io_close(ctx->dev_in);
+
cleanup_packets();
}
@@ -1354,10 +1358,6 @@ thread_out:
if (dev_io_is_netdev(ctx.dev_out) && set_irq_aff)
device_restore_irq_affinity_list();
- dev_io_close(ctx.dev_out);
- if (ctx.dev_in)
- dev_io_close(ctx.dev_in);
-
argv_free(cpp_argv);
free(ctx.device);
free(ctx.rhost);