diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-09-07 07:45:58 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-09-07 07:45:58 -0500 |
commit | 88275c3ae0a002a50a594fb0193805e51f80060d (patch) | |
tree | 6bbb119a9c982e04604980b7b26ce86a91662610 /src | |
parent | ee8cd80522b4a40609974716df6dd5ae8d737e2c (diff) | |
download | ayatana-indicator-datetime-88275c3ae0a002a50a594fb0193805e51f80060d.tar.gz ayatana-indicator-datetime-88275c3ae0a002a50a594fb0193805e51f80060d.tar.bz2 ayatana-indicator-datetime-88275c3ae0a002a50a594fb0193805e51f80060d.zip |
remove unnecessary strdup/free of the location menuitems' labels
Diffstat (limited to 'src')
-rw-r--r-- | src/service.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/service.c b/src/service.c index 2e7b30c..45d152c 100644 --- a/src/service.c +++ b/src/service.c @@ -1030,12 +1030,12 @@ create_locations_section (IndicatorDatetimeService * self) struct TimeLocation * loc = l->data; if (loc->visible) { - char * label; + const char * label; char * detailed_action; char * fmt; GMenuItem * menu_item; - label = g_strdup (loc->name); + label = loc->name; detailed_action = g_strdup_printf ("indicator.set-location::%s %s", loc->zone, loc->name); @@ -1053,7 +1053,6 @@ create_locations_section (IndicatorDatetimeService * self) g_object_unref (menu_item); g_free (fmt); g_free (detailed_action); - g_free (label); } } |