bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26628: [PATCH] Fix memory leak of cwd string in emacsclient


From: Anders Waldenborg
Subject: bug#26628: [PATCH] Fix memory leak of cwd string in emacsclient
Date: Mon, 24 Apr 2017 18:05:51 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Apr 24, 2017 at 11:23:26AM +0200, Andreas Schwab wrote:
> > * lib-src/emacsclient.c (main): emacsclient retrieves the current
> >   working directory using get_current_dir_name which returns a newly
> >   allocated string. Make sure this string is freed before exiting.
> 
> There is no need to free it since the process exists right away anyway.

Yes. Unless you compile with -fsanitize=address and this leak makes
emacsclient mostly unusable as the asan leak checker will change the
return code to non-zero (yes I'm aware that I can set
ASAN_OPTIONS=detect_leaks=0 in the environment).

 anders





reply via email to

[Prev in Thread] Current Thread [Next in Thread]