mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
tools: Fix trivial memory leak.
* tools/gpg-connect-agent.c (main): Fix trivial memory leak. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
401db0eebb
commit
8f39185d7b
@ -1879,6 +1879,16 @@ main (int argc, char **argv)
|
||||
if (opt.verbose)
|
||||
log_info ("closing connection to agent\n");
|
||||
|
||||
/* XXX: We would like to release the context here, but libassuan
|
||||
nicely says good bye to the server, which results in a SIGPIPE if
|
||||
the server died. Unfortunately, libassuan does not ignore
|
||||
SIGPIPE when used with UNIX sockets, hence we simply leak the
|
||||
context here. */
|
||||
if (0)
|
||||
assuan_release (ctx);
|
||||
else
|
||||
gpgrt_annotate_leaked_object (ctx);
|
||||
xfree (line);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user