commit | 8526d158f893283fee0b176ef9c7401133949815 | [log] [tgz] |
---|---|---|
author | Harald Welte <laforge@gnumonks.org> | Fri Dec 18 13:41:39 2015 +0100 |
committer | Harald Welte <laforge@gnumonks.org> | Fri Dec 18 13:41:39 2015 +0100 |
tree | c23ed142a7efb652e37cfb15fab31382dafe0f22 | |
parent | 9c397d4969f6982093bfcec1f7f3770525a46752 [diff] [blame] |
hnbap/rua: Don't usse malloc() directly but use CALLOC() macro
diff --git a/src/hnbap_common.c b/src/hnbap_common.c index d72ca3e..cdf38e0 100644 --- a/src/hnbap_common.c +++ b/src/hnbap_common.c
@@ -223,11 +223,10 @@ IE_t *buff; - if ((buff = MALLOC(sizeof(IE_t))) == NULL) { + if ((buff = CALLOC(1, sizeof(IE_t))) == NULL) { // Possible error on malloc return NULL; } - memset((void *)buff, 0, sizeof(IE_t)); buff->id = id; buff->criticality = criticality;