1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-21 14:00:51 +03:00

Replaced malloc with calloc #295

This commit is contained in:
Will Cosgrove
2019-02-21 09:55:42 -08:00
committed by GitHub
parent b45333b2b6
commit 097448107a

View File

@@ -325,7 +325,7 @@ typedef struct {
#define libssh2_ed25519_ctx libssh2_curve25519_keys
#define libssh2_x25519_ctx libssh2_curve25519_keys
#define _libssh2_ed25519_new_ctx() malloc(sizeof(libssh2_ed25519_ctx))
#define _libssh2_ed25519_new_ctx() calloc(1, sizeof(libssh2_ed25519_ctx))
#define _libssh2_ed25519_free(ctx) do { \
if(ctx) { \
if(ctx->public_key) EVP_PKEY_free(ctx->public_key); \