From c719804fb1ddb9196036ca36660ad28e3e94c38d Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Fri, 9 Aug 2019 23:33:01 +0100 Subject: [PATCH] backend: dummy: initialize backend_base properly Signed-off-by: Yuxuan Shui --- src/backend/dummy/dummy.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/dummy/dummy.c b/src/backend/dummy/dummy.c index 17ad53e..fd541b7 100644 --- a/src/backend/dummy/dummy.c +++ b/src/backend/dummy/dummy.c @@ -20,7 +20,12 @@ struct dummy_data { }; struct backend_base *dummy_init(struct session *ps attr_unused) { - return (struct backend_base *)ccalloc(1, struct dummy_data); + auto ret = (struct backend_base *)ccalloc(1, struct dummy_data); + ret->c = ps->c; + ret->loop = ps->loop; + ret->root = ps->root; + ret->busy = false; + return ret; } void dummy_deinit(struct backend_base *data) {