From a4cc2192aa48646acfff9e5e2150a983c0bcb788 Mon Sep 17 00:00:00 2001 From: dtucker Date: Tue, 29 Apr 2014 19:58:50 +0000 Subject: [PATCH] Move nulling of variable next to where it's freed. ok markus@ --- usr.bin/ssh/sftp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c index c294fa26a6a..02f336ca58d 100644 --- a/usr.bin/ssh/sftp.c +++ b/usr.bin/ssh/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.160 2014/04/22 10:07:12 logan Exp $ */ +/* $OpenBSD: sftp.c,v 1.161 2014/04/29 19:58:50 dtucker Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -1820,6 +1820,7 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path, pwdlen = tmplen + 1; /* track last seen '/' */ } free(tmp); + tmp = NULL; if (g.gl_matchc == 0) goto out; @@ -1827,7 +1828,6 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path, if (g.gl_matchc > 1) complete_display(g.gl_pathv, pwdlen); - tmp = NULL; /* Don't try to extend globs */ if (file == NULL || hadglob) goto out; -- 2.20.1