summaryrefslogtreecommitdiff
path: root/authfile.c
diff options
context:
space:
mode:
authormmcc@openbsd.org <mmcc@openbsd.org>2015-12-11 04:21:11 +0000
committerDamien Miller <djm@mindrot.org>2015-12-18 14:50:48 +1100
commit52d7078421844b2f88329f5be3de370b0a938636 (patch)
tree1241462a841b14259755de181563cc83acd42109 /authfile.c
parenta4b9e0f4e4a6980a0eb8072f76ea611cab5b77e7 (diff)
upstream commit
Remove NULL-checks before sshbuf_free(). ok djm@ Upstream-ID: 5ebed00ed5f9f03b119a345085e8774565466917
Diffstat (limited to 'authfile.c')
-rw-r--r--authfile.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/authfile.c b/authfile.c
index 9cd490ca3..d67042411 100644
--- a/authfile.c
+++ b/authfile.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfile.c,v 1.119 2015/12/11 02:31:47 mmcc Exp $ */ 1/* $OpenBSD: authfile.c,v 1.120 2015/12/11 04:21:11 mmcc Exp $ */
2/* 2/*
3 * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved.
4 * 4 *
@@ -243,8 +243,7 @@ sshkey_load_private_type_fd(int fd, int type, const char *passphrase,
243 /* success */ 243 /* success */
244 r = 0; 244 r = 0;
245 out: 245 out:
246 if (buffer != NULL) 246 sshbuf_free(buffer);
247 sshbuf_free(buffer);
248 return r; 247 return r;
249} 248}
250 249
@@ -278,8 +277,7 @@ sshkey_load_private(const char *filename, const char *passphrase,
278 r = 0; 277 r = 0;
279 out: 278 out:
280 close(fd); 279 close(fd);
281 if (buffer != NULL) 280 sshbuf_free(buffer);
282 sshbuf_free(buffer);
283 return r; 281 return r;
284} 282}
285 283