]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xgettext: Fix memleaks around wrong usage of mixed_string_buffer_done
authorDaiki Ueno <ueno@gnu.org>
Fri, 2 May 2014 12:18:33 +0000 (21:18 +0900)
committerDaiki Ueno <ueno@gnu.org>
Fri, 2 May 2014 12:19:41 +0000 (21:19 +0900)
gettext-tools/src/x-javascript.c
gettext-tools/src/x-python.c
gettext-tools/src/x-vala.c

index 237b68d8f9f0398bdb37d4ac44a534138d06cdae..e09a31d4b974af90fe717879b088365b2b2995fb 100644 (file)
@@ -1220,7 +1220,7 @@ phase5_get (token_ty *tp)
                   else
                     mixed_string_buffer_append_char (bp, uc);
                 }
-              tp->string = xstrdup (mixed_string_buffer_done (bp));
+              tp->string = mixed_string_buffer_done (bp);
               tp->comment = add_reference (savable_comment);
               lexical_context = lc_outside;
               tp->type = last_token_type = token_type_string;
index ee92a8cce76f02ee0d3af4dd266bdb2485fd243d..970006a99e1177ad6d413494de94eafd0c8f299c 100644 (file)
@@ -1425,7 +1425,7 @@ phase5_get (token_ty *tp)
                   else
                     mixed_string_buffer_append_char (bp, uc);
                 }
-              tp->string = xstrdup (mixed_string_buffer_done (bp));
+              tp->string = mixed_string_buffer_done (bp);
               tp->comment = add_reference (savable_comment);
               lexical_context = lc_outside;
               tp->type = token_type_string;
index 6bf5300de98e8f0cac1618a0c7477d2ab2b3a1f0..eade694cd8ffa8754de56cdc2404858b8a017713 100644 (file)
@@ -938,7 +938,7 @@ phase3_get (token_ty *tp)
               }
             tp->type = last_token_type = template
               ? token_type_string_template : token_type_string_literal;
-            tp->string = xstrdup (mixed_string_buffer_done (bp));
+            tp->string = mixed_string_buffer_done (bp);
             tp->comment = add_reference (savable_comment);
             return;
           }