diff options
author | beck <> | 2014-07-13 16:03:10 +0000 |
---|---|---|
committer | beck <> | 2014-07-13 16:03:10 +0000 |
commit | 6e4dfa23733fddf37830d1039cf31a2ffb86bdaf (patch) | |
tree | c2bbb8405534dcf838bc686b6748045284f3966b /src/lib/libcrypto/conf | |
parent | 143b41eb184dd7da7b6f74162483016fbb5faab0 (diff) | |
download | openbsd-6e4dfa23733fddf37830d1039cf31a2ffb86bdaf.tar.gz openbsd-6e4dfa23733fddf37830d1039cf31a2ffb86bdaf.tar.bz2 openbsd-6e4dfa23733fddf37830d1039cf31a2ffb86bdaf.zip |
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@
Diffstat (limited to 'src/lib/libcrypto/conf')
-rw-r--r-- | src/lib/libcrypto/conf/conf_mod.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 @@ | |||
1 | /* $OpenBSD: conf_mod.c,v 1.23 2014/07/11 08:44:48 jsing Exp $ */ | 1 | /* $OpenBSD: conf_mod.c,v 1.24 2014/07/13 16:03:09 beck Exp $ */ |
2 | /* Written by Stephen Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Stephen Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2001. | 3 | * project 2001. |
4 | */ | 4 | */ |
@@ -347,8 +347,8 @@ module_init(CONF_MODULE *pmod, char *name, char *value, const CONF *cnf) | |||
347 | goto err; | 347 | goto err; |
348 | 348 | ||
349 | imod->pmod = pmod; | 349 | imod->pmod = pmod; |
350 | imod->name = BUF_strdup(name); | 350 | imod->name = name ? strdup(name) : NULL; |
351 | imod->value = BUF_strdup(value); | 351 | imod->value = value ? strdup(value) : NULL; |
352 | imod->usr_data = NULL; | 352 | imod->usr_data = NULL; |
353 | 353 | ||
354 | if (!imod->name || !imod->value) | 354 | if (!imod->name || !imod->value) |
@@ -547,7 +547,7 @@ CONF_get1_default_config_file(void) | |||
547 | if (issetugid() == 0) | 547 | if (issetugid() == 0) |
548 | file = getenv("OPENSSL_CONF"); | 548 | file = getenv("OPENSSL_CONF"); |
549 | if (file) | 549 | if (file) |
550 | return BUF_strdup(file); | 550 | return strdup(file); |
551 | if (asprintf(&file, "%s/openssl.cnf", | 551 | if (asprintf(&file, "%s/openssl.cnf", |
552 | X509_get_default_cert_area()) == -1) | 552 | X509_get_default_cert_area()) == -1) |
553 | return (NULL); | 553 | return (NULL); |