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:
parent
f9831a4a1a
commit
e34f49c196
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user