[PATCH powerd 1/2] powerd-dbus: fix potential NULL dereference in inactive code segment

Sascha Silbe silbe at activitycentral.com
Tue May 22 16:11:46 EDT 2012


The deactivated wpa-supplicant 0.7 support code contains a typo that
could cause a NULL dereference if wpa-supplicant dies at just the
right time.

Signed-off-by: Sascha Silbe <silbe at activitycentral.com>
---
 powerd-dbus/wpas_monitor.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/powerd-dbus/wpas_monitor.c b/powerd-dbus/wpas_monitor.c
index e28964f..c54530f 100644
--- a/powerd-dbus/wpas_monitor.c
+++ b/powerd-dbus/wpas_monitor.c
@@ -110,7 +110,7 @@ static void monitor_interface(const gchar *path)
 		0, NULL,
 		WPAS_SERVICE, path, WPAS_INTERFACE_IFACE,
 		NULL, &error);
-	if (!wpas_obj) {
+	if (!proxy) {
 		g_warning("Error creating wpas interface proxy: %s\n", error->message);
 		g_error_free(error);
 		return;
-- 
1.7.10




More information about the Devel mailing list