summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorderaadt <>2014-04-21 16:08:08 +0000
committerderaadt <>2014-04-21 16:08:08 +0000
commit4e74c38c506a70910cb7f88175f2f718983bbdc6 (patch)
treead97c976f5c1f0b1197a38fdc26c3f1f302b0965 /src
parent6f6253dccb308bd03c2bc76fc844fe7921d39d7c (diff)
downloadopenbsd-4e74c38c506a70910cb7f88175f2f718983bbdc6.tar.gz
openbsd-4e74c38c506a70910cb7f88175f2f718983bbdc6.tar.bz2
openbsd-4e74c38c506a70910cb7f88175f2f718983bbdc6.zip
no need for malloc casts
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/x509v3/v3_lib.c2
-rw-r--r--src/lib/libcrypto/x509v3/v3_utl.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_lib.c2
-rw-r--r--src/lib/libssl/src/crypto/x509v3/v3_utl.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_lib.c b/src/lib/libcrypto/x509v3/v3_lib.c
index 0613ea7f22..8d5e6ee911 100644
--- a/src/lib/libcrypto/x509v3/v3_lib.c
+++ b/src/lib/libcrypto/x509v3/v3_lib.c
@@ -133,7 +133,7 @@ int X509V3_EXT_add_alias(int nid_to, int nid_from)
133 X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,X509V3_R_EXTENSION_NOT_FOUND); 133 X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,X509V3_R_EXTENSION_NOT_FOUND);
134 return 0; 134 return 0;
135 } 135 }
136 if(!(tmpext = (X509V3_EXT_METHOD *)malloc(sizeof(X509V3_EXT_METHOD)))) { 136 if(!(tmpext = malloc(sizeof(X509V3_EXT_METHOD)))) {
137 X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,ERR_R_MALLOC_FAILURE); 137 X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,ERR_R_MALLOC_FAILURE);
138 return 0; 138 return 0;
139 } 139 }
diff --git a/src/lib/libcrypto/x509v3/v3_utl.c b/src/lib/libcrypto/x509v3/v3_utl.c
index d938a175ed..f85c1ef82e 100644
--- a/src/lib/libcrypto/x509v3/v3_utl.c
+++ b/src/lib/libcrypto/x509v3/v3_utl.c
@@ -85,7 +85,7 @@ int X509V3_add_value(const char *name, const char *value,
85 char *tname = NULL, *tvalue = NULL; 85 char *tname = NULL, *tvalue = NULL;
86 if(name && !(tname = BUF_strdup(name))) goto err; 86 if(name && !(tname = BUF_strdup(name))) goto err;
87 if(value && !(tvalue = BUF_strdup(value))) goto err; 87 if(value && !(tvalue = BUF_strdup(value))) goto err;
88 if(!(vtmp = (CONF_VALUE *)malloc(sizeof(CONF_VALUE)))) goto err; 88 if(!(vtmp = malloc(sizeof(CONF_VALUE)))) goto err;
89 if(!*extlist && !(*extlist = sk_CONF_VALUE_new_null())) goto err; 89 if(!*extlist && !(*extlist = sk_CONF_VALUE_new_null())) goto err;
90 vtmp->section = NULL; 90 vtmp->section = NULL;
91 vtmp->name = tname; 91 vtmp->name = tname;
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_lib.c b/src/lib/libssl/src/crypto/x509v3/v3_lib.c
index 0613ea7f22..8d5e6ee911 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_lib.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_lib.c
@@ -133,7 +133,7 @@ int X509V3_EXT_add_alias(int nid_to, int nid_from)
133 X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,X509V3_R_EXTENSION_NOT_FOUND); 133 X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,X509V3_R_EXTENSION_NOT_FOUND);
134 return 0; 134 return 0;
135 } 135 }
136 if(!(tmpext = (X509V3_EXT_METHOD *)malloc(sizeof(X509V3_EXT_METHOD)))) { 136 if(!(tmpext = malloc(sizeof(X509V3_EXT_METHOD)))) {
137 X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,ERR_R_MALLOC_FAILURE); 137 X509V3err(X509V3_F_X509V3_EXT_ADD_ALIAS,ERR_R_MALLOC_FAILURE);
138 return 0; 138 return 0;
139 } 139 }
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_utl.c b/src/lib/libssl/src/crypto/x509v3/v3_utl.c
index d938a175ed..f85c1ef82e 100644
--- a/src/lib/libssl/src/crypto/x509v3/v3_utl.c
+++ b/src/lib/libssl/src/crypto/x509v3/v3_utl.c
@@ -85,7 +85,7 @@ int X509V3_add_value(const char *name, const char *value,
85 char *tname = NULL, *tvalue = NULL; 85 char *tname = NULL, *tvalue = NULL;
86 if(name && !(tname = BUF_strdup(name))) goto err; 86 if(name && !(tname = BUF_strdup(name))) goto err;
87 if(value && !(tvalue = BUF_strdup(value))) goto err; 87 if(value && !(tvalue = BUF_strdup(value))) goto err;
88 if(!(vtmp = (CONF_VALUE *)malloc(sizeof(CONF_VALUE)))) goto err; 88 if(!(vtmp = malloc(sizeof(CONF_VALUE)))) goto err;
89 if(!*extlist && !(*extlist = sk_CONF_VALUE_new_null())) goto err; 89 if(!*extlist && !(*extlist = sk_CONF_VALUE_new_null())) goto err;
90 vtmp->section = NULL; 90 vtmp->section = NULL;
91 vtmp->name = tname; 91 vtmp->name = tname;