diff options
author | Lei YU <mine260309@gmail.com> | 2016-11-19 00:47:32 +0800 |
---|---|---|
committer | Lei YU <mine260309@gmail.com> | 2016-11-19 05:23:19 +0800 |
commit | d560aac633d16d8a9a3112afe9adcbcabbfb3a19 (patch) | |
tree | acf3049d0877313ff363102680f06c72248e1232 /libopenbmc_intf | |
parent | 0475f65f5feb9381ef2710dca96b545546ccd944 (diff) | |
download | talos-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.c | 2 |
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; |