From: Eli Zaretskii Date: Sat, 13 Jul 2013 14:21:01 +0000 (+0300) Subject: Prevent leak in GDI objects (bug #14850). X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1798 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=922ae7eeed74d847778907602eb52e97cfb9f212;p=emacs.git Prevent leak in GDI objects (bug #14850). src/w32term.c (x_draw_hollow_cursor): Delete the brush object when returning early. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4bd72f831cd..101672baa1e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2013-07-13 Eli Zaretskii + * w32term.c (x_draw_hollow_cursor): Delete the brush object when + returning early. (Bug#14850) + * coding.c (syms_of_coding): Set up inhibit-null-byte-detection and inhibit-iso-escape-detection attributes of 'undecided'. (Bug#14822) diff --git a/src/w32term.c b/src/w32term.c index c9951ca1d52..732a4f4bfef 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -5174,7 +5174,10 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row) the current matrix is invalid or such, give up. */ cursor_glyph = get_phys_cursor_glyph (w); if (cursor_glyph == NULL) - return; + { + DeleteObject (hb); + return; + } /* Compute frame-relative coordinates for phys cursor. */ get_phys_cursor_geometry (w, row, cursor_glyph, &left, &top, &h);