diff --git a/src/knownhost.c b/src/knownhost.c index 3bf034a..2ac4795 100644 --- a/src/knownhost.c +++ b/src/knownhost.c @@ -109,7 +109,7 @@ libssh2_knownhost_add(LIBSSH2_KNOWNHOSTS *hosts, struct known_host *entry = LIBSSH2_ALLOC(hosts->session, sizeof(struct known_host)); size_t hostlen = strlen(host); - int rc = LIBSSH2_ERROR_MEMORY; + int rc = LIBSSH2_ERROR_ALLOC; char *ptr; unsigned int ptrlen;