dect
/
libdect
Archived
13
0
Fork 0

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:
Patrick McHardy 2010-07-31 18:58:56 +02:00
parent 347f6bfe81
commit 5ee0094057
1 changed files with 2 additions and 0 deletions

View File

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