From: Ken Brown Date: Sat, 24 May 2014 17:59:22 +0000 (-0400) Subject: Fix bug#17510 with a pointer freed more than once (Cygwin-w32-build). X-Git-Tag: emacs-24.3.92~171 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=791dd8e75bf03e9910409e9b6f6f70c37aa42332;p=emacs.git Fix bug#17510 with a pointer freed more than once (Cygwin-w32-build). * src/w32term.c (x_delete_display) [CYGWIN]: Don't free dpyinfo->w32_id_name, to make sure it doesn't get freed more than once. --- diff --git a/src/ChangeLog b/src/ChangeLog index c95e0c9de15..f7747c1e408 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-05-24 Ken Brown + + * w32term.c (x_delete_display) [CYGWIN]: Don't free + dpyinfo->w32_id_name, to make sure it doesn't get freed more than + once. (Bug#17510) + 2014-05-24 Stefan Monnier * xdisp.c: Bind inhibit-quit during pre-redisplay-function. diff --git a/src/w32term.c b/src/w32term.c index f914b5f8625..2781fb63d62 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -6426,7 +6426,11 @@ x_delete_display (struct w32_display_info *dpyinfo) if (dpyinfo->palette) DeleteObject (dpyinfo->palette); } + /* Avoid freeing dpyinfo->w32_id_name more than once if emacs is + running as a daemon; see bug#17510. */ +#ifndef CYGWIN xfree (dpyinfo->w32_id_name); +#endif w32_reset_fringes (); }