aboutsummaryrefslogtreecommitdiff
path: root/vcal.c
diff options
context:
space:
mode:
Diffstat (limited to 'vcal.c')
-rw-r--r--vcal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcal.c b/vcal.c
index 1d1e521a..e1dd3d63 100644
--- a/vcal.c
+++ b/vcal.c
@@ -95,8 +95,8 @@ int push_event(vcalendar* cal, vevent* ev) {
}
int CONSTRUCTOR_DECL(vcalendar) {
- this->events = malloc(sizeof(*this->events));
this->alloc = 1;
+ this->events = calloc(sizeof(*this->events), this->alloc);
this->n_events = 0;
return 0;
}