* src/xsmfns.c (x_session_initialize): Fix memory leak.
This commit is contained in:
parent
a9b72976de
commit
2202952b83
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue