diff -Nru gnome-settings-daemon-3.6.4/debian/changelog gnome-settings-daemon-3.6.4/debian/changelog --- gnome-settings-daemon-3.6.4/debian/changelog 2013-02-12 00:09:11.000000000 +0200 +++ gnome-settings-daemon-3.6.4/debian/changelog 2013-02-13 13:26:23.000000000 +0200 @@ -1,3 +1,10 @@ +gnome-settings-daemon (3.6.4-0ubuntu6) raring; urgency=low + + * debian/patches/nexus_orientation.patch: Fix memory leak when building + pathnames, thanks Jean-Baptiste Lallement! (LP: #1123930) + + -- Jani Monoses Wed, 13 Feb 2013 13:25:19 +0200 + gnome-settings-daemon (3.6.4-0ubuntu5) raring; urgency=low * debian/patches/nexus_orientation.patch: Wait until a DBus connection to diff -Nru gnome-settings-daemon-3.6.4/debian/control gnome-settings-daemon-3.6.4/debian/control --- gnome-settings-daemon-3.6.4/debian/control 2013-02-12 00:09:16.000000000 +0200 +++ gnome-settings-daemon-3.6.4/debian/control 2013-02-13 13:36:50.000000000 +0200 @@ -7,7 +7,7 @@ Priority: optional Maintainer: Ubuntu Desktop Team XSBC-Original-Maintainer: Debian GNOME Maintainers -Uploaders: Debian GNOME Maintainers , Jeremy Bicha +Uploaders: Debian GNOME Maintainers Build-Depends: cdbs, debhelper (>= 9), gnome-pkg-tools, diff -Nru gnome-settings-daemon-3.6.4/debian/patches/nexus-orientation.patch gnome-settings-daemon-3.6.4/debian/patches/nexus-orientation.patch --- gnome-settings-daemon-3.6.4/debian/patches/nexus-orientation.patch 2013-02-12 00:07:05.000000000 +0200 +++ gnome-settings-daemon-3.6.4/debian/patches/nexus-orientation.patch 2013-02-13 13:36:44.000000000 +0200 @@ -3,8 +3,8 @@ ## Bug: https://bugs.launchpad.net/ubuntu-nexus7/+bug/1110360 Index: gnome-settings-daemon-3.6.4/plugins/orientation/gsd-orientation-manager.c =================================================================== ---- gnome-settings-daemon-3.6.4.orig/plugins/orientation/gsd-orientation-manager.c 2013-02-12 00:05:48.337661954 +0200 -+++ gnome-settings-daemon-3.6.4/plugins/orientation/gsd-orientation-manager.c 2013-02-12 00:07:02.370029051 +0200 +--- gnome-settings-daemon-3.6.4.orig/plugins/orientation/gsd-orientation-manager.c 2013-02-13 13:36:14.606221356 +0200 ++++ gnome-settings-daemon-3.6.4/plugins/orientation/gsd-orientation-manager.c 2013-02-13 13:36:38.130337989 +0200 @@ -23,6 +23,7 @@ #include "config.h" @@ -13,7 +13,7 @@ #include #include #include -@@ -87,6 +88,12 @@ +@@ -87,6 +88,14 @@ static gpointer manager_object = NULL; @@ -21,12 +21,14 @@ +#define MPU_POLL_INTERVAL 1 + +static gboolean is_mpu6050 = FALSE; ++static char *mpu6050_accel_x = NULL; ++static char *mpu6050_accel_y = NULL; +static gboolean mpu_timer(GsdOrientationManager *manager); + static GObject * gsd_orientation_manager_constructor (GType type, guint n_construct_properties, -@@ -312,8 +319,11 @@ +@@ -312,8 +321,11 @@ return; manager->priv->orientation_lock = new; @@ -39,7 +41,7 @@ /* Handle the rotations that could have occurred while * we were locked */ do_rotation (manager); -@@ -372,12 +382,14 @@ +@@ -372,12 +384,14 @@ static GUdevDevice * get_accelerometer (GUdevClient *client) { @@ -55,7 +57,7 @@ for (l = list; l != NULL; l = l->next) { GUdevDevice *dev; -@@ -408,6 +420,53 @@ +@@ -408,6 +422,53 @@ return ret; } @@ -82,8 +84,8 @@ + if (manager->priv->xrandr_proxy == NULL) + return TRUE; + -+ x = read_sysfs_attr_as_int(g_build_filename(manager->priv->sysfs_path, "in_accel_x_raw", NULL)); -+ y = read_sysfs_attr_as_int(g_build_filename(manager->priv->sysfs_path, "in_accel_y_raw", NULL)); ++ x = read_sysfs_attr_as_int(mpu6050_accel_x); ++ y = read_sysfs_attr_as_int(mpu6050_accel_y); + + if (x > MPU_THRESHOLD) + orientation = ORIENTATION_NORMAL; @@ -109,7 +111,7 @@ static gboolean gsd_orientation_manager_idle_cb (GsdOrientationManager *manager) { -@@ -432,6 +491,14 @@ +@@ -432,6 +493,16 @@ g_debug ("Found accelerometer at sysfs path '%s'", manager->priv->sysfs_path); manager->priv->prev_orientation = get_orientation_from_device (dev); @@ -118,6 +120,8 @@ + if (g_strcmp0 (g_udev_device_get_sysfs_attr (dev, "name"), "mpu6050") == 0) { + manager->priv->prev_orientation = ORIENTATION_NORMAL; + g_timeout_add_seconds(MPU_POLL_INTERVAL, (GSourceFunc) mpu_timer, manager); ++ mpu6050_accel_x = g_build_filename(manager->priv->sysfs_path, "in_accel_x_raw", NULL); ++ mpu6050_accel_y = g_build_filename(manager->priv->sysfs_path, "in_accel_y_raw", NULL); + is_mpu6050 = TRUE; + } +