Blob Blame History Raw
diff -up gnome-power-manager-2.26.1/src/gpm-button.c~ gnome-power-manager-2.26.1/src/gpm-button.c
--- gnome-power-manager-2.26.1/src/gpm-button.c~	2009-04-21 11:43:28.000000000 +0100
+++ gnome-power-manager-2.26.1/src/gpm-button.c	2009-04-26 20:28:35.000000000 +0100
@@ -326,6 +326,10 @@ emit_button_pressed (GpmButton *button, 
 	/* we need to get the button state for lid buttons */
 	if (strcmp (type, "lid") == 0)
 		hal_device_get_bool (device, "button.state.value", &state, NULL);
+	else {
+		g_free (type);
+		return;
+	}
 
 	/* abstact away that HAL has an extra parameter */
 	if (strcmp (type, GPM_BUTTON_LID_DEP) == 0 && state == FALSE)