From 9608cea7484b193084d9818bd893b4bb6d77cf25 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Thu, 26 Jan 2012 21:08:23 +0100 Subject: [PATCH] de-xmalloc ssh_api.c --- ssh/ssh_api.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ssh/ssh_api.c b/ssh/ssh_api.c index b131357..7715492 100644 --- a/ssh/ssh_api.c +++ b/ssh/ssh_api.c @@ -8,7 +8,6 @@ #include "ssh1.h" #include "ssh2.h" #include "version.h" -#include "xmalloc.h" #include "myproposal.h" #include "err.h" @@ -100,7 +99,7 @@ ssh_free(struct ssh *ssh) ssh_packet_close(ssh); if (ssh->kex); kex_free(ssh->kex); - xfree(ssh); + free(ssh); } /* Returns < 0 on error, 0 otherwise */ @@ -444,7 +443,7 @@ _ssh_order_hostkeyalgs(struct ssh *ssh) goto out; } maxlen = strlen(avail) + 1; - if ((replace = xmalloc(maxlen)) == NULL) { + if ((replace = calloc(1, maxlen)) == NULL) { r = SSH_ERR_ALLOC_FAIL; goto out; }