diff options
author | Nalin Dahyabhai <nalin@dahyabhai.net> | 2013-08-06 17:25:39 -0400 |
---|---|---|
committer | Nalin Dahyabhai <nalin@dahyabhai.net> | 2013-08-12 15:43:32 -0400 |
commit | 03d8666a9a38811b1422f1e30b5c175028c6a5aa (patch) | |
tree | 4466f977a544f60c70deaaa812ad611877f8f321 | |
parent | 27dcf97dca7d14c089873e72ac00ca8e4dc82264 (diff) | |
download | slapi-nis-03d8666a9a38811b1422f1e30b5c175028c6a5aa.tar.gz slapi-nis-03d8666a9a38811b1422f1e30b5c175028c6a5aa.tar.xz slapi-nis-03d8666a9a38811b1422f1e30b5c175028c6a5aa.zip |
Ensure that the grouplist entry array is inited
When allocating the array for returning a list of group entries, use
calloc() to ensure that the array is zero-filled, in case resizing it
fails for some reason.
-rw-r--r-- | src/back-sch-nss.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/back-sch-nss.c b/src/back-sch-nss.c index c8aaa20..469e46c 100644 --- a/src/back-sch-nss.c +++ b/src/back-sch-nss.c @@ -431,7 +431,7 @@ repeat: } } while (rc != ngroups); - entries = malloc(sizeof(Slapi_Entry *) * ngroups); + entries = calloc(ngroups, sizeof(Slapi_Entry *)); if (entries == NULL) { free(grouplist); return NULL; |