From e5af70e09143c346b8053e8f1d4f9bcd66f8d436 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 14 Nov 2015 19:52:12 +0100 Subject: [PATCH] system_property_get - add goto error --- frontend/drivers/platform_linux.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/drivers/platform_linux.c b/frontend/drivers/platform_linux.c index 1065fdae9e..b1ce63aa3b 100644 --- a/frontend/drivers/platform_linux.c +++ b/frontend/drivers/platform_linux.c @@ -789,10 +789,7 @@ int system_property_get(const char *command, const char *args, char *value) pipe = popen(cmd, "r"); if (!pipe) - { - RARCH_ERR("Could not create pipe.\n"); - return 0; - } + goto error; curpos = value; @@ -814,6 +811,10 @@ int system_property_get(const char *command, const char *args, char *value) pclose(pipe); return length; + +error: + RARCH_ERR("Could not create pipe.\n"); + return 0; } static void frontend_android_get_name(char *s, size_t len)