2007-09-13 Marcus Brinkmann <marcus@g10code.de>

* rungpg.c (gpg_new): Handle return value of _gpgme_getenv (fixes
	small memory leak).
This commit is contained in:
Marcus Brinkmann 2007-09-13 20:42:04 +00:00
parent dc9b29175f
commit 5de5a01672
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2007-09-13 Marcus Brinkmann <marcus@g10code.de>
* rungpg.c (gpg_new): Handle return value of _gpgme_getenv (fixes
small memory leak).
2007-09-07 Marcus Brinkmann <marcus@g10code.de> 2007-09-07 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (libgpgme_qt_la_SOURCES): Move * Makefile.am (libgpgme_qt_la_SOURCES): Move

View File

@ -463,6 +463,8 @@ gpg_new (void **engine, const char *file_name, const char *home_dir)
goto leave; goto leave;
rc = _gpgme_getenv ("DISPLAY", &dft_display); rc = _gpgme_getenv ("DISPLAY", &dft_display);
if (rc)
goto leave;
if (dft_display) if (dft_display)
{ {
rc = add_arg (gpg, "--display"); rc = add_arg (gpg, "--display");
@ -471,8 +473,6 @@ gpg_new (void **engine, const char *file_name, const char *home_dir)
free (dft_display); free (dft_display);
} }
if (rc)
goto leave;
if (isatty (1)) if (isatty (1))
{ {
@ -489,7 +489,7 @@ gpg_new (void **engine, const char *file_name, const char *home_dir)
if (!rc) if (!rc)
{ {
rc = _gpgme_getenv ("TERM", &dft_ttytype); rc = _gpgme_getenv ("TERM", &dft_ttytype);
if (!rc) if (rc)
goto leave; goto leave;
rc = add_arg (gpg, "--ttytype"); rc = add_arg (gpg, "--ttytype");