before calling free - of some course parts of the code already did this.
free(ne_types);
free(buf);
free(mval);
+
return n;
error:
X509_NAME_free(n);
- if (ne_values)
- free(ne_values);
- if (ne_types)
- free(ne_types);
- if (mval)
- free(mval);
- if (buf)
- free(buf);
+ free(ne_values);
+ free(ne_types);
+ free(mval);
+ free(buf);
+
return NULL;
}
}
rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp);
free(stmp);
+
return rv;
}
errorline, configfile);
goto err;
}
- if (tofree) {
- free(tofree);
- tofree = NULL;
- }
+ free(tofree);
+ tofree = NULL;
+
if (!load_config(bio_err, conf))
goto err;
ret = 0;
err:
- if (tofree)
- free(tofree);
+ free(tofree);
+
BIO_free_all(Cout);
BIO_free_all(Sout);
BIO_free_all(out);
ok = 1;
err:
for (i = 0; i < DB_NUMBER; i++)
- if (row[i] != NULL)
- free(row[i]);
+ free(row[i]);
if (CAname != NULL)
X509_NAME_free(CAname);
ok = 1;
err:
- for (i = 0; i < DB_NUMBER; i++) {
- if (row[i] != NULL)
- free(row[i]);
- }
+ for (i = 0; i < DB_NUMBER; i++)
+ free(row[i]);
+
return (ok);
}
}
err:
- for (i = 0; i < DB_NUMBER; i++) {
- if (row[i] != NULL)
- free(row[i]);
- }
+ for (i = 0; i < DB_NUMBER; i++)
+ free(row[i]);
+
return (ok);
}
ret = 1;
err:
- if (tmp)
- free(tmp);
+ free(tmp);
+
ASN1_OBJECT_free(hold);
ASN1_GENERALIZEDTIME_free(comp_time);
ASN1_ENUMERATED_free(rtmp);
ret = 1;
err:
- if (tmp)
- free(tmp);
+ free(tmp);
+
if (!phold)
ASN1_OBJECT_free(hold);
if (!pinvtm)
sk_OPENSSL_STRING_free(sksigners);
if (skkeys)
sk_OPENSSL_STRING_free(skkeys);
- if (secret_key)
- free(secret_key);
- if (secret_keyid)
- free(secret_keyid);
- if (pwri_tmp)
- free(pwri_tmp);
+ free(secret_key);
+ free(secret_keyid);
+ free(pwri_tmp);
if (econtent_type)
ASN1_OBJECT_free(econtent_type);
if (rr)
BIO_free(in);
BIO_free(indata);
BIO_free_all(out);
- if (passin)
- free(passin);
+ free(passin);
return (ret);
}
}
if (in != NULL)
BIO_free(in);
- if (passin)
- free(passin);
+ free(passin);
BIO_free_all(out);
EVP_PKEY_free(sigkey);
if (sigopts)
sk_OPENSSL_STRING_free(sigopts);
if (macopts)
sk_OPENSSL_STRING_free(macopts);
- if (sigbuf)
- free(sigbuf);
+ free(sigbuf);
if (bmd != NULL)
BIO_free(bmd);
BIO_free_all(out);
if (dsa != NULL)
DSA_free(dsa);
- if (passin)
- free(passin);
- if (passout)
- free(passout);
+ free(passin);
+ free(passout);
return (ret);
}
BIO_free_all(out);
if (eckey)
EC_KEY_free(eckey);
- if (passin)
- free(passin);
- if (passout)
- free(passout);
+ free(passin);
+ free(passout);
return (ret);
}
BN_free(ec_order);
if (ec_cofactor)
BN_free(ec_cofactor);
- if (buffer)
- free(buffer);
+ free(buffer);
if (in != NULL)
BIO_free(in);
if (out != NULL)
}
end:
ERR_print_errors(bio_err);
- if (strbuf != NULL)
- free(strbuf);
- if (buff != NULL)
- free(buff);
+ free(strbuf);
+ free(buff);
if (in != NULL)
BIO_free(in);
if (out != NULL)
if (bzl != NULL)
BIO_free(bzl);
#endif
- if (pass)
- free(pass);
+ free(pass);
return (ret);
}
}
free(name);
name = NULL;
- if (desc) {
- free(desc);
- desc = NULL;
- }
+ free(desc);
+ desc = NULL;
+
/* Move to the next command */
num = ENGINE_ctrl(e, ENGINE_CTRL_GET_NEXT_CMD_TYPE,
num, NULL, NULL);
err:
if (cmds)
sk_OPENSSL_STRING_pop_free(cmds, identity);
- if (name)
- free(name);
- if (desc)
- free(desc);
+ free(name);
+ free(desc);
return ret;
}
BIO_free_all(out);
if (dsa != NULL)
DSA_free(dsa);
- if (passout)
- free(passout);
+ free(passout);
return (ret);
}
if (out)
BIO_free_all(out);
BIO_free(in);
- if (pass)
- free(pass);
+ free(pass);
return ret;
}
RSA_free(rsa);
if (out)
BIO_free_all(out);
- if (passout)
- free(passout);
+ free(passout);
if (ret != 0)
ERR_print_errors(bio_err);
}
if (prog != NULL)
lh_FUNCTION_free(prog);
- if (arg.data != NULL)
- free(arg.data);
+ free(arg.data);
openssl_shutdown();
err:
ERR_print_errors(bio_err);
- if (salt_malloc)
- free(salt_malloc);
- if (passwd_malloc)
- free(passwd_malloc);
+ free(salt_malloc);
+ free(passwd_malloc);
if (in)
BIO_free(in);
if (out)
BIO_free_all(out);
if (canames)
sk_OPENSSL_STRING_free(canames);
- if (passin)
- free(passin);
- if (passout)
- free(passout);
+ free(passin);
+ free(passout);
return (ret);
}
EVP_PKEY_free(pkey);
BIO_free_all(out);
BIO_free(in);
- if (passin)
- free(passin);
- if (passout)
- free(passout);
+ free(passin);
+ free(passout);
return ret;
}
EVP_PKEY_free(pkey);
BIO_free_all(out);
BIO_free(in);
- if (passin)
- free(passin);
- if (passout)
- free(passout);
+ free(passin);
+ free(passout);
return ret;
}
EVP_PKEY_CTX_free(ctx);
BIO_free(in);
BIO_free_all(out);
- if (buf_in)
- free(buf_in);
- if (buf_out)
- free(buf_out);
- if (sig)
- free(sig);
+ free(buf_in);
+ free(buf_out);
+ free(sig);
+
return ret;
}
if (gen_eng)
ENGINE_free(gen_eng);
#endif
- if (keyalgstr)
- free(keyalgstr);
+ free(keyalgstr);
X509_REQ_free(req);
X509_free(x509ss);
ASN1_INTEGER_free(serial);
BIO_free_all(out);
if (rsa != NULL)
RSA_free(rsa);
- if (passin)
- free(passin);
- if (passout)
- free(passout);
+ free(passin);
+ free(passout);
return (ret);
}
BIO_dump(out, (char *) rsa_out, rsa_outlen);
else
BIO_write(out, rsa_out, rsa_outlen);
+
end:
RSA_free(rsa);
BIO_free(in);
BIO_free_all(out);
- if (rsa_in)
- free(rsa_in);
- if (rsa_out)
- free(rsa_out);
- if (passin)
- free(passin);
+ free(rsa_in);
+ free(rsa_out);
+ free(passin);
+
return ret;
}
SSL_free(con);
}
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
- if (next_proto.data)
- free(next_proto.data);
+ free(next_proto.data);
#endif
if (ctx != NULL)
SSL_CTX_free(ctx);
X509_free(cert);
if (key)
EVP_PKEY_free(key);
- if (pass)
- free(pass);
+ free(pass);
if (vpm)
X509_VERIFY_PARAM_free(vpm);
if (cbuf != NULL) {
EVP_PKEY_free(s_key);
if (s_dkey)
EVP_PKEY_free(s_dkey);
- if (pass)
- free(pass);
- if (dpass)
- free(dpass);
+ free(pass);
+ free(dpass);
if (vpm)
X509_VERIFY_PARAM_free(vpm);
#ifndef OPENSSL_NO_TLSEXT
} else
sock = accept_socket;
i = (*cb) (name, sock, context);
- if (name != NULL)
- free(name);
+ free(name);
if (type == SOCK_STREAM) {
shutdown(sock, SHUT_RDWR);
close(sock);
BIO_free(in);
BIO_free(indata);
BIO_free_all(out);
- if (passin)
- free(passin);
+ free(passin);
+
return (ret);
}
end:
ERR_print_errors(bio_err);
- if (buf != NULL)
- free(buf);
- if (buf2 != NULL)
- free(buf2);
+ free(buf);
+ free(buf2);
#ifndef OPENSSL_NO_RSA
for (i = 0; i < RSA_NUM; i++)
if (rsa_key[i] != NULL)
BIO_free(in);
BIO_free_all(out);
EVP_PKEY_free(pkey);
- if (passin)
- free(passin);
+ free(passin);
return (ret);
}
free(data);
ASN1_OBJECT_free(policy_obj);
ASN1_INTEGER_free(nonce_asn1);
+
return ts_req;
}
ASN1_INTEGER_free(sno);
sk_ASN1_OBJECT_pop_free(trust, ASN1_OBJECT_free);
sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
- if (passin)
- free(passin);
+ free(passin);
return (ret);
}
goto end;
end:
- if (buf)
- free(buf);
+ free(buf);
BN_free(serial);
+
return bs;
}