catch error from asprintf()
This commit is contained in:
		| @@ -528,8 +528,8 @@ main(int argc, char **argv) | |||||||
|     setup_signal(); |     setup_signal(); | ||||||
|  |  | ||||||
|     if (config_file == NULL) { |     if (config_file == NULL) { | ||||||
| 	asprintf(&config_file, "%s/kdc.conf", hdb_db_dir(context)); | 	if (asprintf(&config_file, "%s/kdc.conf", hdb_db_dir(context)) == -1 | ||||||
| 	if (config_file == NULL) | 	    || config_file == NULL) | ||||||
| 	    errx(1, "out of memory"); | 	    errx(1, "out of memory"); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Love Hornquist Astrand
					Love Hornquist Astrand