libsubid_init: return false if out of memory
The rest of the run isn't likely to get much better, is it? Thanks to Alexey for pointing this out. Signed-off-by: Serge Hallyn <serge@hallyn.com> Cc: Alexey Tikhonov <atikhono@redhat.com>
This commit is contained in:
		| @@ -46,10 +46,12 @@ bool libsubid_init(const char *progname, FILE * logfd) | ||||
| { | ||||
| 	if (progname) { | ||||
| 		progname = strdup(progname); | ||||
| 		if (progname) | ||||
| 		if (progname) { | ||||
| 			Prog = progname; | ||||
| 		else | ||||
| 		} else { | ||||
| 			fprintf(stderr, "Out of memory"); | ||||
| 			return false; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if (logfd) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user