From 67847ad55bb506b526be3ad43c785bc9eb18a42e Mon Sep 17 00:00:00 2001 From: Hernando Torque Date: Mon, 12 Mar 2012 22:30:54 +0100 Subject: Fix small memory leak by freeing string returned by dbus_g_method_get_sender. --- src/application-service-watcher.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/application-service-watcher.c b/src/application-service-watcher.c index 50b0be9..1c12eee 100644 --- a/src/application-service-watcher.c +++ b/src/application-service-watcher.c @@ -249,9 +249,11 @@ _notification_watcher_server_register_status_notifier_item (ApplicationServiceWa ApplicationServiceWatcherPrivate * priv = APPLICATION_SERVICE_WATCHER_GET_PRIVATE(appwatcher); if (service[0] == '/') { + char * sender = dbus_g_method_get_sender(method); application_service_appstore_application_add(priv->appstore, - dbus_g_method_get_sender(method), + sender, service); + g_free(sender); } else { application_service_appstore_application_add(priv->appstore, service, @@ -293,9 +295,11 @@ _notification_watcher_server_x_ayatana_register_notification_approver (Applicati { ApplicationServiceWatcherPrivate * priv = APPLICATION_SERVICE_WATCHER_GET_PRIVATE(appwatcher); + char * sender = dbus_g_method_get_sender(method); application_service_appstore_approver_add(priv->appstore, - dbus_g_method_get_sender(method), + sender, path); + g_free(sender); dbus_g_method_return(method, G_TYPE_NONE); return TRUE; -- cgit v1.2.3 From 256988db2ddd0999cc64f55250062f0382b6cf49 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 12 Mar 2012 19:52:28 -0500 Subject: change local guint8 fields that get left-shifted to guint32 to prevent overflow, as reported by coverity in lp bug #944234 --- src/generate-id.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/generate-id.c b/src/generate-id.c index 14d762e..9515860 100644 --- a/src/generate-id.c +++ b/src/generate-id.c @@ -26,10 +26,10 @@ with this program. If not, see . guint32 generate_id (const AppIndicatorCategory catenum, const gchar * id) { - guchar category = 0; - guchar first = 0; - guchar second = 0; - guchar third = 0; + guint32 category = 0; + guint32 first = 0; + guint32 second = 0; + guint32 third = 0; switch (catenum) { case APP_INDICATOR_CATEGORY_OTHER: -- cgit v1.2.3 From 8e26e844c5f42d55257b6f8e52634314d134b4d8 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 13 Mar 2012 15:00:31 -0500 Subject: 0.4.93 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 3e714eb..064de6f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(indicator-application, 0.4.92, ted@canonical.com) +AC_INIT(indicator-application, 0.4.93, ted@canonical.com) AC_COPYRIGHT([Copyright 2009, 2010 Canonical]) AC_PREREQ(2.53) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(indicator-application, 0.4.92) +AM_INIT_AUTOMAKE(indicator-application, 0.4.93) AM_MAINTAINER_MODE -- cgit v1.2.3