summaryrefslogtreecommitdiff
path: root/intl.c
diff options
context:
space:
mode:
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: