diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2012-07-12 17:26:03 -0400 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2012-08-22 13:47:40 +0100 |
commit | d2aa0ce5d8c93e777d201da779f13802e5249c95 (patch) | |
tree | 218a99dc08649b0f63225c367d2fb4d2f39827e5 /panels/common | |
parent | e730edb6cc4a5477be9608bf6798ac747558f0f0 (diff) | |
download | gnome-control-center-d2aa0ce5d8c93e777d201da779f13802e5249c95.tar.gz |
common: Fix memory leaks in language sorting
https://bugzilla.gnome.org/show_bug.cgi?id=679836
Diffstat (limited to 'panels/common')
-rw-r--r-- | panels/common/cc-common-language.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/panels/common/cc-common-language.c b/panels/common/cc-common-language.c index 28973a897..765882ba2 100644 --- a/panels/common/cc-common-language.c +++ b/panels/common/cc-common-language.c @@ -61,21 +61,21 @@ cc_common_language_sort_languages (GtkTreeModel *model, /* Sort before and after separator first */ if (sa && sb) - return 0; - if (sa) - return ulb ? 1 : -1; - if (sb) - return ula ? -1 : 1; + result 0; + else if (sa) + result = ulb ? 1 : -1; + else if (sb) + result = ula ? -1 : 1; /* Sort user-languages first */ - if (ula != ulb) { + else if (ula != ulb) { if (ula) - return -1; + result = -1; else - return 1; + result = 1; } - if (!ca) + else if (!ca) result = 1; else if (!cb) result = -1; |