(krb5_get_init_creds_opt_alloc): add context argument
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12782 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -44,17 +44,21 @@ krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt) | |||||||
| } | } | ||||||
|  |  | ||||||
| krb5_error_code | krb5_error_code | ||||||
| krb5_get_init_creds_opt_alloc(krb5_get_init_creds_opt **opt) | krb5_get_init_creds_opt_alloc(krb5_context context,  | ||||||
|  | 			      krb5_get_init_creds_opt **opt) | ||||||
| { | { | ||||||
|     krb5_get_init_creds_opt *o; |     krb5_get_init_creds_opt *o; | ||||||
|      |      | ||||||
|     *opt = NULL; |     *opt = NULL; | ||||||
|     o = calloc(1, sizeof(*o)); |     o = calloc(1, sizeof(*o)); | ||||||
|     if (o == NULL) |     if (o == NULL) { | ||||||
|  | 	krb5_set_error_string(context, "out of memory"); | ||||||
| 	return ENOMEM; | 	return ENOMEM; | ||||||
|  |     } | ||||||
|     krb5_get_init_creds_opt_init(o); |     krb5_get_init_creds_opt_init(o); | ||||||
|     o->private = calloc(1, sizeof(*o->private)); |     o->private = calloc(1, sizeof(*o->private)); | ||||||
|     if (o->private == NULL) { |     if (o->private == NULL) { | ||||||
|  | 	krb5_set_error_string(context, "out of memory"); | ||||||
| 	free(o); | 	free(o); | ||||||
| 	return ENOMEM; | 	return ENOMEM; | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Love Hörnquist Åstrand
					Love Hörnquist Åstrand