* src/xsmfns.c (x_session_initialize): Fix memory leak.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user