summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-01-08 01:52:01 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-01-08 01:52:01 +0000
commit7172e7826c4ae3d221022f25f7f1d67b4dd2f6e9 (patch)
treebce423c199f706d40555a9f1a3112c298790918b
parente47154763f613912eff963517f850e7585d25668 (diff)
STRING is never NULL so there is no need to test it for NULL before
freeing it.
-rw-r--r--libexec/ftpd/ftpcmd.y18
1 files changed, 6 insertions, 12 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index de5c92594b1..5284a99ef20 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftpcmd.y,v 1.28 2001/12/28 17:38:17 millert Exp $ */
+/* $OpenBSD: ftpcmd.y,v 1.29 2002/01/08 01:52:00 millert Exp $ */
/* $NetBSD: ftpcmd.y,v 1.7 1996/04/08 19:03:11 jtc Exp $ */
/*
@@ -47,7 +47,7 @@
#if 0
static char sccsid[] = "@(#)ftpcmd.y 8.3 (Berkeley) 4/6/94";
#else
-static char rcsid[] = "$OpenBSD: ftpcmd.y,v 1.28 2001/12/28 17:38:17 millert Exp $";
+static char rcsid[] = "$OpenBSD: ftpcmd.y,v 1.29 2002/01/08 01:52:00 millert Exp $";
#endif
#endif /* not lint */
@@ -237,8 +237,7 @@ cmd
{
if ($2)
extended_port($4);
- if ($4 != NULL)
- free($4);
+ free($4);
}
| PASV check_login_epsvall CRLF
@@ -372,8 +371,7 @@ cmd
{
if ($2 && $4 != NULL)
send_file_list($4);
- if ($4 != NULL)
- free($4);
+ free($4);
}
| LIST check_login CRLF
{
@@ -455,9 +453,7 @@ cmd
help(sitetab, NULL);
} else
help(cmdtab, $3);
-
- if ($3 != NULL)
- free ($3);
+ free ($3);
}
| NOOP CRLF
{
@@ -494,9 +490,7 @@ cmd
| SITE SP HELP SP STRING CRLF
{
help(sitetab, $5);
-
- if ($5 != NULL)
- free ($5);
+ free ($5);
}
| SITE SP UMASK check_login CRLF
{