diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/engine/eng_list.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libcrypto/engine/eng_list.c b/src/lib/libcrypto/engine/eng_list.c index 8bb1bc58f2..134866d2c6 100644 --- a/src/lib/libcrypto/engine/eng_list.c +++ b/src/lib/libcrypto/engine/eng_list.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: eng_list.c,v 1.22 2017/01/29 17:49:23 beck Exp $ */ | 1 | /* $OpenBSD: eng_list.c,v 1.23 2018/08/24 19:25:31 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 | */ |
| @@ -373,10 +373,12 @@ ENGINE_by_id(const char *id) | |||
| 373 | int | 373 | int |
| 374 | ENGINE_up_ref(ENGINE *e) | 374 | ENGINE_up_ref(ENGINE *e) |
| 375 | { | 375 | { |
| 376 | int refs; | ||
| 377 | |||
| 376 | if (e == NULL) { | 378 | if (e == NULL) { |
| 377 | ENGINEerror(ERR_R_PASSED_NULL_PARAMETER); | 379 | ENGINEerror(ERR_R_PASSED_NULL_PARAMETER); |
| 378 | return 0; | 380 | return 0; |
| 379 | } | 381 | } |
| 380 | CRYPTO_add(&e->struct_ref, 1, CRYPTO_LOCK_ENGINE); | 382 | refs = CRYPTO_add(&e->struct_ref, 1, CRYPTO_LOCK_ENGINE); |
| 381 | return 1; | 383 | return refs > 1 ? 1 : 0; |
| 382 | } | 384 | } |
