aboutsummaryrefslogtreecommitdiffstats
path: root/src/get-env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/get-env.c')
-rw-r--r--src/get-env.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/get-env.c b/src/get-env.c
index 57fd4196..d611d7e3 100644
--- a/src/get-env.c
+++ b/src/get-env.c
@@ -26,13 +26,14 @@
#include <string.h>
#include "util.h"
+#include "mem.h"
#if defined(HAVE_THREAD_SAFE_GETENV) || !defined (HAVE_GETENV_R)
/* We prefer using getenv() if it is thread-safe. */
/* Retrieve the environment variable NAME and return a copy of it in a
- malloc()'ed buffer in *VALUE. If the environment variable is not
+ _gpgme_malloc()'ed buffer in *VALUE. If the environment variable is not
set, return NULL in *VALUE. */
gpgme_error_t
_gpgme_getenv (const char *name, char **value)
@@ -44,7 +45,7 @@ _gpgme_getenv (const char *name, char **value)
*value = NULL;
else
{
- *value = strdup (env_value);
+ *value = _gpgme_strdup (env_value);
if (!*value)
return gpg_error_from_syserror ();
}