summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-04-25 16:51:00 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-05-02 08:10:16 -0400
commitc6c4b5a848735dfad4a071c09c00184791409b3f (patch)
tree102f8cb3bb7005ef196063c1ba7b6bb233eb7b26 /src
parentdebccfee089ff6e952733f44c891840b74e243ec (diff)
downloadsssd-c6c4b5a848735dfad4a071c09c00184791409b3f.tar.gz
sssd-c6c4b5a848735dfad4a071c09c00184791409b3f.tar.bz2
sssd-c6c4b5a848735dfad4a071c09c00184791409b3f.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/responder/ssh/sshsrv_cmd.c3
1 files changed, 2 insertions, 1 deletions
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);