diff options
author | Patrick McHardy <kaber@trash.net> | 2010-07-31 18:58:56 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-07-31 18:58:56 +0200 |
commit | 5ee0094057dab5fb7e289aa6c2a34d2728a51698 (patch) | |
tree | fd086f8be1c61b5c8402dc1691c9e4380879bda2 /src | |
parent | 347f6bfe81d4c9d49019adae17b29a483ff74145 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/libdect.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libdect.c b/src/libdect.c index b89eec5..f70100e 100644 --- a/src/libdect.c +++ b/src/libdect.c @@ -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); |