Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 199329 Details for
Bug 278760
x11-base/xorg-server-1.6.2-r1: SIGSEGV with sys-apps/hal-0.5.13
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-config-add-HAL-error-checks.patch
0001-config-add-HAL-error-checks.patch (text/plain), 3.15 KB, created by
Rémi Cardona (RETIRED)
on 2009-07-27 12:06:45 UTC
(
hide
)
Description:
0001-config-add-HAL-error-checks.patch
Filename:
MIME Type:
Creator:
Rémi Cardona (RETIRED)
Created:
2009-07-27 12:06:45 UTC
Size:
3.15 KB
patch
obsolete
>From 10483983abdb37ea3ab9d9940abffab6f087ab0d Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?R=C3=A9mi=20Cardona?= <remi@gentoo.org> >Date: Mon, 27 Jul 2009 12:07:51 +0200 >Subject: [PATCH] config: add HAL error checks >MIME-Version: 1.0 >Content-Type: text/plain; charset=utf-8 >Content-Transfer-Encoding: 8bit > >This patch simplifies error handling in the HAL code and fixes a >segfault if libhal_find_device_by_capability() failed. > >Fixes http://bugs.gentoo.org/278760 > >Based on a patch by Martin von Gagern <Martin.vGagern@gmx.net> > >Signed-off-by: Rémi Cardona <remi@gentoo.org> >--- > config/hal.c | 29 ++++++++++++++++++++--------- > 1 files changed, 20 insertions(+), 9 deletions(-) > >diff --git a/config/hal.c b/config/hal.c >index 36fa839..a7a086f 100644 >--- a/config/hal.c >+++ b/config/hal.c >@@ -474,13 +474,13 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info) > char **devices; > int num_devices, i; > >+ if (info->hal_ctx) >+ return TRUE; /* already registered, pretend we did something */ >+ > info->system_bus = connection; > > dbus_error_init(&error); > >- if (info->hal_ctx) >- return TRUE; /* already registered, pretend we did something */ >- > info->hal_ctx = libhal_ctx_new(); > if (!info->hal_ctx) { > LogMessage(X_ERROR, "config/hal: couldn't create HAL context\n"); >@@ -499,7 +499,7 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info) > if (!libhal_device_property_watch_all(info->hal_ctx, &error)) { > LogMessage(X_ERROR, "config/hal: couldn't watch all properties: %s (%s)\n", > error.name, error.message); >- goto out_ctx2; >+ goto out_ctx; > } > libhal_ctx_set_device_added(info->hal_ctx, device_added); > libhal_ctx_set_device_removed(info->hal_ctx, device_removed); >@@ -507,6 +507,11 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info) > devices = libhal_find_device_by_capability(info->hal_ctx, "input", > &num_devices, &error); > /* FIXME: Get default devices if error is set. */ >+ if (dbus_error_is_set(&error)) { >+ LogMessage(X_ERROR, "config/hal: couldn't find input device: %s (%s)\n", >+ error.name, error.message); >+ goto out_ctx; >+ } > for (i = 0; i < num_devices; i++) > device_added(info->hal_ctx, devices[i]); > libhal_free_string_array(devices); >@@ -515,12 +520,18 @@ connect_and_register(DBusConnection *connection, struct config_hal_info *info) > > return TRUE; > >-out_ctx2: >- if (!libhal_ctx_shutdown(info->hal_ctx, &error)) >- LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n", >- error.name, error.message); > out_ctx: >- libhal_ctx_free(info->hal_ctx); >+ dbus_error_free(&error); >+ >+ if (info->hal_ctx) { >+ if (!libhal_ctx_shutdown(info->hal_ctx, &error)) { >+ LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n", >+ error.name, error.message); >+ dbus_error_free(&error); >+ } >+ libhal_ctx_free(info->hal_ctx); >+ } >+ > out_err: > dbus_error_free(&error); > >-- >1.6.3.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 278760
:
198837
|
198841
|
198883
| 199329