Skip to content

Commit 9674832

Browse files
committed
Follow up to r1926950: Fix a missing error check.
* buckets/ssl_buckets.c (ssl_pass_cb): Remove the unused 'status' variable and instead check the return value from ctx->cert_pw_callback. git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1926966 13f79535-47bb-0310-9956-ffa450edef68
1 parent 67676e0 commit 9674832

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

buckets/ssl_buckets.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,17 +1565,16 @@ static int ssl_pass_cb(UI *ui, UI_STRING *uis)
15651565
serf_ssl_context_t *ctx = UI_get0_user_data(ui);
15661566

15671567
const char *password;
1568-
apr_status_t status;
15691568

15701569
if (ctx->cert_pw_success) {
1571-
status = APR_SUCCESS;
15721570
password = ctx->cert_pw_success;
15731571
ctx->cert_pw_success = NULL;
15741572
}
15751573
else if (ctx->cert_pw_callback) {
1576-
status = ctx->cert_pw_callback(ctx->cert_pw_userdata,
1577-
ctx->cert_uri,
1578-
&password);
1574+
if (APR_SUCCESS != ctx->cert_pw_callback(ctx->cert_pw_userdata,
1575+
ctx->cert_uri,
1576+
&password))
1577+
return 0;
15791578
}
15801579
else {
15811580
return 0;

0 commit comments

Comments
 (0)