Merge pull request #341 from hallyn/2021-05-17/fail

libsubid_init: return false if out of memory
This commit is contained in:
Serge Hallyn 2021-05-17 08:49:31 -05:00 committed by GitHub
commit c6cab4a7ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {