From c6c4b5a848735dfad4a071c09c00184791409b3f Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 25 Apr 2012 16:51:00 +0200 Subject: SSH: return NULL on error in ssh_host_pubkeys_format_known_host_plain The 'result' pointer must be initialized tin order to always return a defined value. --- src/responder/ssh/sshsrv_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/responder') diff --git a/src/responder/ssh/sshsrv_cmd.c b/src/responder/ssh/sshsrv_cmd.c index 4766ed8b..0740cd25 100644 --- a/src/responder/ssh/sshsrv_cmd.c +++ b/src/responder/ssh/sshsrv_cmd.c @@ -422,7 +422,8 @@ ssh_host_pubkeys_format_known_host_plain(TALLOC_CTX *mem_ctx, struct sss_ssh_ent *ent) { TALLOC_CTX *tmp_ctx; - char *name, *pubkey, *result; + char *name, *pubkey; + char *result = NULL; size_t i; tmp_ctx = talloc_new(NULL); -- cgit