Fix for mk_cred.c: calloc() not malloc()
Avoid calling free() in cleanup on uninitialized sub-ptrs if error occurs.
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7034
target_version: 1.10
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25496
dc483132-0cff-0310-8789-
dd5450dbe970
* structure and copy the ticket into the ticket list.
*/
for (i = 0; i < nppcreds; i++) {
- credenc.ticket_info[i] = malloc(sizeof(krb5_cred_info));
+ credenc.ticket_info[i] = calloc(1, sizeof(krb5_cred_info));
if (credenc.ticket_info[i] == NULL) {
retval = ENOMEM;
goto cleanup;