mirror of
https://github.com/clearlinux/linux-steam-integration.git
synced 2026-09-06 22:01:27 +00:00
redirect: Clean up init, don't use fprintf when OOM
Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This commit is contained in:
+3
-3
@@ -12,7 +12,6 @@
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <libgen.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
@@ -132,11 +131,12 @@ __attribute__((constructor)) static void lsi_redirect_init(void)
|
||||
{
|
||||
/* Ensure we're open. */
|
||||
lsi_redirect_init_tables();
|
||||
autofree(char) *process_name = NULL;
|
||||
|
||||
autofree(char) *process_name = lsi_get_process_name();
|
||||
process_name = lsi_get_process_name();
|
||||
|
||||
if (!process_name) {
|
||||
fprintf(stderr, "Failure to allocate memory! %s\n", strerror(errno));
|
||||
fputs("Out of memory!\n", stderr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user