(_krb5_get_init_creds_opt_copy): use calloc to avoid uninitialized
memory problem. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16938 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -75,7 +75,7 @@ _krb5_get_init_creds_opt_copy(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt;
|
||||
|
||||
*out = NULL;
|
||||
opt = malloc(sizeof(*opt));
|
||||
opt = calloc(1, sizeof(*opt));
|
||||
if (opt == NULL) {
|
||||
krb5_set_error_string(context, "out of memory");
|
||||
return ENOMEM;
|
||||
|
Reference in New Issue
Block a user