commit eeecbaff395702e975d92d0f7b552751a8d4bad1 Author: Jesper Fehrlund Date: Mon Oct 27 14:19:19 2014 +0000 Fixes double free when using the same argnum for singular and plural diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c index eb3a660..1fb88bb 100644 --- a/gettext-tools/src/xgettext.c +++ b/gettext-tools/src/xgettext.c @@ -2793,7 +2793,10 @@ arglist_parser_remember_literal (struct arglist_parser *ap, } if (argnum == cp->argnum2) { - cp->msgid_plural = string; + if (stored_string) + cp->msgid_plural = strdup(string); + else + cp->msgid_plural = string; cp->msgid_plural_escape = type; cp->msgid_plural_context = context; cp->msgid_plural_pos.file_name = file_name;