backend: dummy: initialize backend_base properly

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-08-09 23:33:01 +01:00
parent c8d6a5cae5
commit c719804fb1
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 6 additions and 1 deletions

View File

@ -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) {