From 6d6a4a488d7b631f519b1cf462ffbb44d399e1ce Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 26 Apr 2017 19:44:41 +0200 Subject: ipcpd: Fix start/stop order in dt --- src/ipcpd/normal/dt.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c index 6ac73a93..8b10c84c 100644 --- a/src/ipcpd/normal/dt.c +++ b/src/ipcpd/normal/dt.c @@ -230,16 +230,16 @@ int dt_start(void) return -1; } - dt.gam = gam_create(pg, dt.nbs, dt.ae); - if (dt.gam == NULL) { - log_err("Failed to init dt graph adjacency manager."); - return -1; - } - dt.sdu_sched = sdu_sched_create(sdu_handler); if (dt.sdu_sched == NULL) { log_err("Failed to create N-1 SDU scheduler."); - gam_destroy(dt.gam); + return -1; + } + + dt.gam = gam_create(pg, dt.nbs, dt.ae); + if (dt.gam == NULL) { + log_err("Failed to init dt graph adjacency manager."); + sdu_sched_destroy(dt.sdu_sched); return -1; } @@ -248,9 +248,9 @@ int dt_start(void) void dt_stop(void) { - sdu_sched_destroy(dt.sdu_sched); - gam_destroy(dt.gam); + + sdu_sched_destroy(dt.sdu_sched); } int dt_write_sdu(struct pci * pci, -- cgit v1.2.3