* src/xsmfns.c (x_session_initialize): Fix memory leak.

This commit is contained in:
Paul Eggert 2017-10-07 22:48:49 -07:00
parent a9b72976de
commit 2202952b83

View file

@ -401,12 +401,14 @@ x_session_initialize (struct x_display_info *dpyinfo)
ptrdiff_t name_len = 0;
/* libSM seems to crash if pwd is missing - see bug#18851. */
if (! emacs_get_current_dir_name ())
char *pwd = emacs_get_current_dir_name ();
if (!pwd)
{
fprintf (stderr, "Disabling session management due to pwd error: %s\n",
emacs_strerror (errno));
return;
}
xfree (pwd);
ice_fd = -1;
doing_interact = false;