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 authored and GitHub committed 2021-05-17 08:49:31 -05:00
commit c6cab4a7ba
1 file changed
+4 -2
+4 -2
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) {