crypt_init: use correct error define

This commit is contained in:
Daniel Stenberg 2010-10-07 11:21:20 +02:00
parent 9887c01103
commit 046ad88d88

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2009 Simon Josefsson <simon@josefsson.org>
/* Copyright (c) 2009, 2010 Simon Josefsson <simon@josefsson.org>
* Copyright (c) 2004-2007, Sara Golemon <sarag@libssh2.org>
* All rights reserved.
*
@ -79,9 +79,9 @@ crypt_init(LIBSSH2_SESSION * session,
{
struct crypt_ctx *ctx = LIBSSH2_ALLOC(session,
sizeof(struct crypt_ctx));
if (!ctx) {
return -1;
}
if (!ctx)
return LIBSSH2_ERROR_ALLOC;
ctx->encrypt = encrypt;
ctx->algo = method->algo;
if (_libssh2_cipher_init(&ctx->h, ctx->algo, iv, secret, encrypt)) {