From 6e4dfa23733fddf37830d1039cf31a2ffb86bdaf Mon Sep 17 00:00:00 2001 From: beck <> Date: Sun, 13 Jul 2014 16:03:10 +0000 Subject: The bell tolls for BUF_strdup - Start the migration to using intrinsics. This is the easy ones, a few left to check one at a time. ok miod@ deraadt@ --- src/lib/libcrypto/conf/conf_mod.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/libcrypto/conf') diff --git a/src/lib/libcrypto/conf/conf_mod.c b/src/lib/libcrypto/conf/conf_mod.c index 36ffeb9f95..c4c429497c 100644 --- a/src/lib/libcrypto/conf/conf_mod.c +++ b/src/lib/libcrypto/conf/conf_mod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf_mod.c,v 1.23 2014/07/11 08:44:48 jsing Exp $ */ +/* $OpenBSD: conf_mod.c,v 1.24 2014/07/13 16:03:09 beck Exp $ */ /* Written by Stephen Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -347,8 +347,8 @@ module_init(CONF_MODULE *pmod, char *name, char *value, const CONF *cnf) goto err; imod->pmod = pmod; - imod->name = BUF_strdup(name); - imod->value = BUF_strdup(value); + imod->name = name ? strdup(name) : NULL; + imod->value = value ? strdup(value) : NULL; imod->usr_data = NULL; if (!imod->name || !imod->value) @@ -547,7 +547,7 @@ CONF_get1_default_config_file(void) if (issetugid() == 0) file = getenv("OPENSSL_CONF"); if (file) - return BUF_strdup(file); + return strdup(file); if (asprintf(&file, "%s/openssl.cnf", X509_get_default_cert_area()) == -1) return (NULL); -- cgit v1.2.3-55-g6feb