diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-06-02 07:31:17 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-06-02 07:31:17 +1000 |
commit | a627d42e51ffa71e014d7b2d2c07118122fd3ec3 (patch) | |
tree | 7bda769de81f509e28d800916fa20abd37906d79 /ssh-add.c | |
parent | c7aad0058c957afeb26a3f703e8cb0eddeb62365 (diff) |
- djm@cvs.openbsd.org 2013/05/17 00:13:13
[xmalloc.h cipher.c sftp-glob.c ssh-keyscan.c ssh.c sftp-common.c
ssh-ecdsa.c auth2-chall.c compat.c readconf.c kexgexs.c monitor.c
gss-genr.c cipher-3des1.c kex.c monitor_wrap.c ssh-pkcs11-client.c
auth-options.c rsa.c auth2-pubkey.c sftp.c hostfile.c auth2.c
servconf.c auth.c authfile.c xmalloc.c uuencode.c sftp-client.c
auth2-gss.c sftp-server.c bufaux.c mac.c session.c jpake.c kexgexc.c
sshconnect.c auth-chall.c auth2-passwd.c sshconnect1.c buffer.c
kexecdhs.c kexdhs.c ssh-rsa.c auth1.c ssh-pkcs11.c auth2-kbdint.c
kexdhc.c sshd.c umac.c ssh-dss.c auth2-jpake.c bufbn.c clientloop.c
monitor_mm.c scp.c roaming_client.c serverloop.c key.c auth-rsa.c
ssh-pkcs11-helper.c ssh-keysign.c ssh-keygen.c match.c channels.c
sshconnect2.c addrmatch.c mux.c canohost.c kexecdhc.c schnorr.c
ssh-add.c misc.c auth2-hostbased.c ssh-agent.c bufec.c groupaccess.c
dns.c packet.c readpass.c authfd.c moduli.c]
bye, bye xfree(); ok markus@
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-add.c,v 1.105 2012/12/05 15:42:52 markus Exp $ */ | 1 | /* $OpenBSD: ssh-add.c,v 1.106 2013/05/17 00:13:14 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -90,7 +90,7 @@ clear_pass(void) | |||
90 | { | 90 | { |
91 | if (pass) { | 91 | if (pass) { |
92 | memset(pass, 0, strlen(pass)); | 92 | memset(pass, 0, strlen(pass)); |
93 | xfree(pass); | 93 | free(pass); |
94 | pass = NULL; | 94 | pass = NULL; |
95 | } | 95 | } |
96 | } | 96 | } |
@@ -215,7 +215,7 @@ add_file(AuthenticationConnection *ac, const char *filename, int key_only) | |||
215 | pass = read_passphrase(msg, RP_ALLOW_STDIN); | 215 | pass = read_passphrase(msg, RP_ALLOW_STDIN); |
216 | if (strcmp(pass, "") == 0) { | 216 | if (strcmp(pass, "") == 0) { |
217 | clear_pass(); | 217 | clear_pass(); |
218 | xfree(comment); | 218 | free(comment); |
219 | buffer_free(&keyblob); | 219 | buffer_free(&keyblob); |
220 | return -1; | 220 | return -1; |
221 | } | 221 | } |
@@ -282,8 +282,8 @@ add_file(AuthenticationConnection *ac, const char *filename, int key_only) | |||
282 | fprintf(stderr, "The user must confirm each use of the key\n"); | 282 | fprintf(stderr, "The user must confirm each use of the key\n"); |
283 | out: | 283 | out: |
284 | if (certpath != NULL) | 284 | if (certpath != NULL) |
285 | xfree(certpath); | 285 | free(certpath); |
286 | xfree(comment); | 286 | free(comment); |
287 | key_free(private); | 287 | key_free(private); |
288 | 288 | ||
289 | return ret; | 289 | return ret; |
@@ -308,7 +308,7 @@ update_card(AuthenticationConnection *ac, int add, const char *id) | |||
308 | add ? "add" : "remove", id); | 308 | add ? "add" : "remove", id); |
309 | ret = -1; | 309 | ret = -1; |
310 | } | 310 | } |
311 | xfree(pin); | 311 | free(pin); |
312 | return ret; | 312 | return ret; |
313 | } | 313 | } |
314 | 314 | ||
@@ -330,14 +330,14 @@ list_identities(AuthenticationConnection *ac, int do_fp) | |||
330 | SSH_FP_HEX); | 330 | SSH_FP_HEX); |
331 | printf("%d %s %s (%s)\n", | 331 | printf("%d %s %s (%s)\n", |
332 | key_size(key), fp, comment, key_type(key)); | 332 | key_size(key), fp, comment, key_type(key)); |
333 | xfree(fp); | 333 | free(fp); |
334 | } else { | 334 | } else { |
335 | if (!key_write(key, stdout)) | 335 | if (!key_write(key, stdout)) |
336 | fprintf(stderr, "key_write failed"); | 336 | fprintf(stderr, "key_write failed"); |
337 | fprintf(stdout, " %s\n", comment); | 337 | fprintf(stdout, " %s\n", comment); |
338 | } | 338 | } |
339 | key_free(key); | 339 | key_free(key); |
340 | xfree(comment); | 340 | free(comment); |
341 | } | 341 | } |
342 | } | 342 | } |
343 | if (!had_identities) { | 343 | if (!had_identities) { |
@@ -363,7 +363,7 @@ lock_agent(AuthenticationConnection *ac, int lock) | |||
363 | passok = 0; | 363 | passok = 0; |
364 | } | 364 | } |
365 | memset(p2, 0, strlen(p2)); | 365 | memset(p2, 0, strlen(p2)); |
366 | xfree(p2); | 366 | free(p2); |
367 | } | 367 | } |
368 | if (passok && ssh_lock_agent(ac, lock, p1)) { | 368 | if (passok && ssh_lock_agent(ac, lock, p1)) { |
369 | fprintf(stderr, "Agent %slocked.\n", lock ? "" : "un"); | 369 | fprintf(stderr, "Agent %slocked.\n", lock ? "" : "un"); |
@@ -371,7 +371,7 @@ lock_agent(AuthenticationConnection *ac, int lock) | |||
371 | } else | 371 | } else |
372 | fprintf(stderr, "Failed to %slock agent.\n", lock ? "" : "un"); | 372 | fprintf(stderr, "Failed to %slock agent.\n", lock ? "" : "un"); |
373 | memset(p1, 0, strlen(p1)); | 373 | memset(p1, 0, strlen(p1)); |
374 | xfree(p1); | 374 | free(p1); |
375 | return (ret); | 375 | return (ret); |
376 | } | 376 | } |
377 | 377 | ||