libdect: zero libdect handle on allocation
Zero the DECT handle on allocation to properly initialize the various members. Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
347f6bfe81
commit
5ee0094057
|
@ -34,6 +34,8 @@ struct dect_handle *dect_alloc_handle(struct dect_ops *ops)
|
|||
dh = ops->malloc(sizeof(*dh));
|
||||
if (dh == NULL)
|
||||
return NULL;
|
||||
memset(dh, 0, sizeof(*dh));
|
||||
|
||||
dh->ops = ops;
|
||||
init_list_head(&dh->links);
|
||||
init_list_head(&dh->mme_list);
|
||||
|
|
Reference in New Issue