aboutsummaryrefslogtreecommitdiff
path: root/intl.c
diff options
context:
space:
mode:
authorAgney Lopes Roth Ferraz <agney@users.sourceforge.net>2005-06-13 18:34:20 -0300
committerSimon Quigley <tsimonq2@ubuntu.com>2017-06-19 14:38:31 -0500
commit61dfceab1e3e9d77aa2900a6e333961f89c4ef45 (patch)
tree673b0f2f59b4b9ed4c2595a5690aa63480190103 /intl.c
parent7d65a12d6431f72e601ea1d0c3ef5d09af8bfb96 (diff)
parenta08438bda21b3e0d7db2db2360d040841970104d (diff)
Import Debian changes 0.3.7pre-1
hardinfo (0.3.7pre-1) unstable; urgency=low * New upstream release. (Closes: #280694, #300114, #233033)
Diffstat (limited to 'intl.c')
-rw-r--r--intl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/intl.c b/intl.c
index e0817b51..82ac163f 100644
--- a/intl.c
+++ b/intl.c
@@ -41,7 +41,8 @@ void intl_init(void)
}
/*
- * GNU's gettext is cool and all... but hey, this is smaller :)
+ * GNU's gettext is cool and all... but hey, this is smaller,
+ * but slower :P
*/
const gchar *
intl_translate(const gchar * string, const gchar * source) __THROW
@@ -50,7 +51,7 @@ intl_translate(const gchar * string, const gchar * source) __THROW
gchar buffer[256], *keyname, *lang = NULL, *langenv = NULL;
const gchar *retval, *langvars[] =
{"LANG", "LC_MESSAGES", "LC_ALL", NULL};
- gboolean found;
+ gboolean found = FALSE;
struct stat st;
gint i = 0;
@@ -67,6 +68,7 @@ intl_translate(const gchar * string, const gchar * source) __THROW
langenv_ok:
lang = g_strconcat(INTL_PREFIX, langenv, ".lang", NULL);
if (stat(lang, &st)) {
+ g_free(lang);
lang = g_strconcat(INTL_PREFIX, "default.lang", NULL);
if (stat(lang, &st)) {
not_found: