projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
free NULL cleanup
[openssl.git]
/
crypto
/
asn1
/
a_utctm.c
diff --git
a/crypto/asn1/a_utctm.c
b/crypto/asn1/a_utctm.c
index 2dac3b58b4c629063cc6638c602c7d839cb1e4aa..0e2f1b0c40b506c2331536ac15f8ba9ef5b5139e 100644
(file)
--- a/
crypto/asn1/a_utctm.c
+++ b/
crypto/asn1/a_utctm.c
@@
-193,11
+193,11
@@
ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
int free_s = 0;
if (s == NULL) {
int free_s = 0;
if (s == NULL) {
- free_s = 1;
s = ASN1_UTCTIME_new();
s = ASN1_UTCTIME_new();
+ if (s == NULL)
+ goto err;
+ free_s = 1;
}
}
- if (s == NULL)
- goto err;
ts = OPENSSL_gmtime(&t, &data);
if (ts == NULL)
ts = OPENSSL_gmtime(&t, &data);
if (ts == NULL)
@@
-233,7
+233,7
@@
ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
#endif
return (s);
err:
#endif
return (s);
err:
- if (free_s
&& s
)
+ if (free_s)
ASN1_UTCTIME_free(s);
return NULL;
}
ASN1_UTCTIME_free(s);
return NULL;
}