From 51fd6d8292cb41d743407e6ac9d86a5ab8e68d8c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 6 Feb 2013 17:35:40 +0100 Subject: Use gpg_error_from_syserror instead of directly accessing errno. -- Also fixed a couple of minor thing; e.g. save the error before calling cleanup functions. Do not save the errno if only free is called in between. --- src/engine-gpgconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/engine-gpgconf.c') diff --git a/src/engine-gpgconf.c b/src/engine-gpgconf.c index b50b6351..96c6b3db 100644 --- a/src/engine-gpgconf.c +++ b/src/engine-gpgconf.c @@ -96,7 +96,7 @@ gpgconf_new (void **engine, const char *file_name, const char *home_dir) gpgconf = calloc (1, sizeof *gpgconf); if (!gpgconf) - return gpg_error_from_errno (errno); + return gpg_error_from_syserror (); gpgconf->file_name = strdup (file_name ? file_name : _gpgme_get_gpgconf_path ()); -- cgit v1.2.3