[PATCH 1/2] Set error to NULL before passing to g_spawn_command_line_async()
Richard Hughes
hughsient at gmail.com
Sun Jun 28 00:15:22 PDT 2009
On Sat, Jun 27, 2009 at 9:18 PM, Roland Dreier<roland at digitalvampire.org> wrote:
> If the local variable error in dkp_daemon_set_pmutils_powersave() isn't
> initialized, it's likely to hold some random non-NULL value from the
> stack and glib functions won't overwrite it to return on error. So if
> g_spawn_command_line_async() fails with error uninitialized, we end up
> crashing because the code calls g_error_free() on the original random
> bogus stack value of error. Fix this by initializing error to NULL when
> it's declared.
Committed, thanks.
Richard.
More information about the devkit-devel
mailing list