Avoid useing freed memory.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21140 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -100,12 +100,13 @@ hx509_certs_init(hx509_context context, | |||||||
|     } |     } | ||||||
|      |      | ||||||
|     ops = _hx509_ks_type(context, type); |     ops = _hx509_ks_type(context, type); | ||||||
|     free(type); |  | ||||||
|     if (ops == NULL) { |     if (ops == NULL) { | ||||||
| 	hx509_set_error_string(context, 0, ENOENT,  | 	hx509_set_error_string(context, 0, ENOENT,  | ||||||
| 			       "Keyset type %s is not supported", type); | 			       "Keyset type %s is not supported", type); | ||||||
|  | 	free(type); | ||||||
| 	return ENOENT; | 	return ENOENT; | ||||||
|     } |     } | ||||||
|  |     free(type); | ||||||
|     c = calloc(1, sizeof(*c)); |     c = calloc(1, sizeof(*c)); | ||||||
|     if (c == NULL) { |     if (c == NULL) { | ||||||
| 	hx509_clear_error_string(context); | 	hx509_clear_error_string(context); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Love Hörnquist Åstrand
					Love Hörnquist Åstrand