aboutsummaryrefslogtreecommitdiff
path: root/src/gssapi.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-07-14 14:19:03 +0200
committerAndreas Schneider <asn@cryptomilk.org>2013-07-14 15:01:55 +0200
commit8f0b6ccd66b785e24fc0aae37e11e1fc834bf6ff (patch)
tree5e071ea8f9c5c62c33f08b9ff003349e6f4ebc0f /src/gssapi.c
parentb4790fbdd2de674bfa6eb971533bfad857d5da26 (diff)
downloadlibssh-8f0b6ccd66b785e24fc0aae37e11e1fc834bf6ff.tar.gz
libssh-8f0b6ccd66b785e24fc0aae37e11e1fc834bf6ff.tar.xz
libssh-8f0b6ccd66b785e24fc0aae37e11e1fc834bf6ff.zip
gssapi: Fix a possible memory leak.
CID #0
Diffstat (limited to 'src/gssapi.c')
-rw-r--r--src/gssapi.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gssapi.c b/src/gssapi.c
index 97035588..9c07b8bf 100644
--- a/src/gssapi.c
+++ b/src/gssapi.c
@@ -671,10 +671,14 @@ int ssh_gssapi_auth_mic(ssh_session session){
}
rc = ssh_gssapi_send_auth_mic(session, oids, n_oids);
- if (rc != SSH_ERROR)
+ for (i = 0; i < n_oids; i++) {
+ ssh_string_free(oids[i]);
+ }
+ if (rc != SSH_ERROR) {
return SSH_AUTH_AGAIN;
- else
- return SSH_AUTH_ERROR;
+ }
+
+ return SSH_AUTH_ERROR;
}
static gss_OID ssh_gssapi_oid_from_string(ssh_string oid_s){