dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
gedcom-parse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b4b646
)
setlocale returns a string in static storage, so must use strdup
author
Peter Verthez
<Peter.Verthez@advalvas.be>
Wed, 16 Jan 2002 17:47:53 +0000
(17:47 +0000)
committer
Peter Verthez
<Peter.Verthez@advalvas.be>
Wed, 16 Jan 2002 17:47:53 +0000
(17:47 +0000)
(and free it afterwards)
gedcom/multilex.c
patch
|
blob
|
history
diff --git
a/gedcom/multilex.c
b/gedcom/multilex.c
index 471f5ac37fed065a388799f7715662a5ac07777e..42b9f5000613e95c959b32e226e89578e1a2fe4a 100644
(file)
--- a/
gedcom/multilex.c
+++ b/
gedcom/multilex.c
@@
-111,7
+111,7
@@
int gedcom_parse_file(char* file_name)
int result = 1;
FILE* file;
- char *save_locale = s
etlocale(LC_ALL, NULL
);
+ char *save_locale = s
trdup(setlocale(LC_ALL, NULL)
);
char *save_textdom = textdomain(NULL);
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
@@
-140,6
+140,7
@@
int gedcom_parse_file(char* file_name)
textdomain(save_textdom);
setlocale(LC_ALL, save_locale);
+ free(save_locale);
return result;
}