summaryrefslogtreecommitdiffstats
path: root/libopenbmc_intf
diff options
context:
space:
mode:
authorLei YU <mine260309@gmail.com>2016-11-19 00:47:32 +0800
committerLei YU <mine260309@gmail.com>2016-11-19 05:23:19 +0800
commitd560aac633d16d8a9a3112afe9adcbcabbfb3a19 (patch)
treeacf3049d0877313ff363102680f06c72248e1232 /libopenbmc_intf
parent0475f65f5feb9381ef2710dca96b545546ccd944 (diff)
downloadtalos-skeleton-d560aac633d16d8a9a3112afe9adcbcabbfb3a19.tar.gz
talos-skeleton-d560aac633d16d8a9a3112afe9adcbcabbfb3a19.zip
Initialize GError* to NULL before calling g_dbus_proxy_new_syn
This fixes the crash issue of power_control when manually build and replace executable or library. The reason why it does not crash on a full OpenBMC build may be due to the prelink clear the stack (not sure). Fixes openbmc/openbmc#818. Change-Id: I17b0e2188ebe14815d67a7f07eba4906bde75e3c Signed-off-by: Lei YU <mine260309@gmail.com>
Diffstat (limited to 'libopenbmc_intf')
-rw-r--r--libopenbmc_intf/power_gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopenbmc_intf/power_gpio.c b/libopenbmc_intf/power_gpio.c
index 3c44c81..1e7d9cd 100644
--- a/libopenbmc_intf/power_gpio.c
+++ b/libopenbmc_intf/power_gpio.c
@@ -25,7 +25,7 @@
gboolean read_power_gpio(GDBusConnection *connection, PowerGpio *power_gpio)
{
GDBusProxy *proxy;
- GError *error;
+ GError *error = NULL;
GVariant *value;
gchar *power_good_in_name;
gchar *latch_out_name;
OpenPOWER on IntegriCloud