diff options
author | mmcc@openbsd.org <mmcc@openbsd.org> | 2015-12-11 04:21:11 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-12-18 14:50:48 +1100 |
commit | 52d7078421844b2f88329f5be3de370b0a938636 (patch) | |
tree | 1241462a841b14259755de181563cc83acd42109 /authfile.c | |
parent | a4b9e0f4e4a6980a0eb8072f76ea611cab5b77e7 (diff) | |
download | openssh-git-52d7078421844b2f88329f5be3de370b0a938636.tar.gz |
upstream commit
Remove NULL-checks before sshbuf_free().
ok djm@
Upstream-ID: 5ebed00ed5f9f03b119a345085e8774565466917
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: authfile.c,v 1.119 2015/12/11 02:31:47 mmcc Exp $ */ +/* $OpenBSD: authfile.c,v 1.120 2015/12/11 04:21:11 mmcc Exp $ */ /* * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. * @@ -243,8 +243,7 @@ sshkey_load_private_type_fd(int fd, int type, const char *passphrase, /* success */ r = 0; out: - if (buffer != NULL) - sshbuf_free(buffer); + sshbuf_free(buffer); return r; } @@ -278,8 +277,7 @@ sshkey_load_private(const char *filename, const char *passphrase, r = 0; out: close(fd); - if (buffer != NULL) - sshbuf_free(buffer); + sshbuf_free(buffer); return r; } |