diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/dso/dso_lib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/dso/dso_lib.c b/src/lib/libcrypto/dso/dso_lib.c index 7902fbcc6e..6dc98803ec 100644 --- a/src/lib/libcrypto/dso/dso_lib.c +++ b/src/lib/libcrypto/dso/dso_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dso_lib.c,v 1.19 2017/01/29 17:49:23 beck Exp $ */ | 1 | /* $OpenBSD: dso_lib.c,v 1.20 2018/08/24 19:27:01 tb Exp $ */ |
| 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL | 2 | /* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -174,13 +174,15 @@ DSO_flags(DSO *dso) | |||
| 174 | int | 174 | int |
| 175 | DSO_up_ref(DSO *dso) | 175 | DSO_up_ref(DSO *dso) |
| 176 | { | 176 | { |
| 177 | int refs; | ||
| 178 | |||
| 177 | if (dso == NULL) { | 179 | if (dso == NULL) { |
| 178 | DSOerror(ERR_R_PASSED_NULL_PARAMETER); | 180 | DSOerror(ERR_R_PASSED_NULL_PARAMETER); |
| 179 | return (0); | 181 | return (0); |
| 180 | } | 182 | } |
| 181 | 183 | ||
| 182 | CRYPTO_add(&dso->references, 1, CRYPTO_LOCK_DSO); | 184 | refs = CRYPTO_add(&dso->references, 1, CRYPTO_LOCK_DSO); |
| 183 | return (1); | 185 | return ((refs > 1) ? 1 : 0); |
| 184 | } | 186 | } |
| 185 | 187 | ||
| 186 | DSO * | 188 | DSO * |
