diff options
author | Mattias Andrée <maandree@kth.se> | 2021-04-02 22:47:53 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-04-02 22:47:53 +0200 |
commit | d161aa539a449cc6fa66fb73ad54f997bcd49b13 (patch) | |
tree | e59a18a53191c148fc372a7cbbc82cd000bbfadc /libcontacts_load_contacts.c | |
parent | Add full name, use separate fields for birthday componets and add when leapies celebrate on common years (diff) | |
download | libcontacts-d161aa539a449cc6fa66fb73ad54f997bcd49b13.tar.gz libcontacts-d161aa539a449cc6fa66fb73ad54f997bcd49b13.tar.bz2 libcontacts-d161aa539a449cc6fa66fb73ad54f997bcd49b13.tar.xz |
Fix parsing and memory leaks
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libcontacts_load_contacts.c')
-rw-r--r-- | libcontacts_load_contacts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcontacts_load_contacts.c b/libcontacts_load_contacts.c index 91f8c56..0bb0b86 100644 --- a/libcontacts_load_contacts.c +++ b/libcontacts_load_contacts.c @@ -17,7 +17,7 @@ libcontacts_load_contacts(struct libcontacts_contact ***contactsp, const struct return -1; for (n = 0; ids[n]; n++); - *contactsp = calloc(n, sizeof(**contactsp)); + *contactsp = calloc(n + 1, sizeof(**contactsp)); if (!*contactsp) goto fail; |