]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
libtextstyle: Fix a memory leak.
authorBruno Haible <bruno@clisp.org>
Tue, 14 Apr 2020 21:48:23 +0000 (23:48 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 14 Apr 2020 21:48:23 +0000 (23:48 +0200)
Reported by José E. Marchesi <jemarch@gnu.org>.

* libtextstyle/gnulib-local/lib/term-ostream.oo.c (term_ostream::free): Free
also the stream's attrbuffer.

libtextstyle/gnulib-local/lib/term-ostream.oo.c

index 52b447f0c77b579a4922e0397dbead63f6a1608c..36d84d31c8db1d9e91d889afa0d9d97244bbfa98 100644 (file)
@@ -1,5 +1,5 @@
 /* Output stream for attributed text, producing ANSI escape sequences.
-   Copyright (C) 2006-2008, 2017, 2019 Free Software Foundation, Inc.
+   Copyright (C) 2006-2008, 2017, 2019-2020 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
@@ -2105,6 +2105,7 @@ term_ostream::free (term_ostream_t stream)
       free (stream->hyperlinks_array);
     }
   free (stream->buffer);
+  free (stream->attrbuffer);
   free (stream);
 }