We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c28c81 commit 0735d74Copy full SHA for 0735d74
gettext.c
@@ -161,18 +161,23 @@ static void init_gettext_charset(const char *domain)
161
void git_setup_gettext(void)
162
{
163
const char *podir = getenv(GIT_TEXT_DOMAIN_DIR_ENVIRONMENT);
164
+ char *p = NULL;
165
166
if (!podir)
- podir = system_path(GIT_LOCALE_PATH);
167
+ podir = p = system_path(GIT_LOCALE_PATH);
168
- if (!is_directory(podir))
169
+ if (!is_directory(podir)) {
170
+ free(p);
171
return;
172
+ }
173
174
bindtextdomain("git", podir);
175
setlocale(LC_MESSAGES, "");
176
setlocale(LC_TIME, "");
177
init_gettext_charset("git");
178
textdomain("git");
179
+
180
181
}
182
183
/* return the number of columns of string 's' in current locale */
0 commit comments