bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58028: 29.0.50; Ensures no leakage of glyph_matrix


From: Eli Zaretskii
Subject: bug#58028: 29.0.50; Ensures no leakage of glyph_matrix
Date: Sat, 24 Sep 2022 15:31:07 +0300

> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: 58028@debbugs.gnu.org
> Date: Sat, 24 Sep 2022 12:29:17 +0200
> 
> +       eassert ((w->desired_matrix == NULL)
> +                && (w->current_matrix != NULL));
>         if (w->desired_matrix == NULL)
> -         {
> -           w->desired_matrix = new_glyph_matrix (NULL);
> -           w->current_matrix = new_glyph_matrix (NULL);
> -         }
> +         w->desired_matrix = new_glyph_matrix (NULL);
> +
> +       if (w->current_matrix == NULL)
> +         w->current_matrix = new_glyph_matrix (NULL);

I think this should be

          /* If matrices are not yet allocated, allocate them now.  */
          if (w->desired_matrix == NULL)
            {
              w->desired_matrix = new_glyph_matrix (NULL);
              eassert (w->current_matrix == NULL);
            }

          if (w->current_matrix == NULL)
            w->current_matrix = new_glyph_matrix (NULL);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]