1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-22 16:42:56 -08:00

Remove NULL-checks before free(). ok tb@

This commit is contained in:
mmcc 2015-12-09 19:29:49 +00:00
parent 5cbef84ffb
commit b711046028
2 changed files with 5 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: whois.c,v 1.52 2015/11/02 20:39:37 sthen Exp $ */
/* $OpenBSD: whois.c,v 1.53 2015/12/09 19:29:49 mmcc Exp $ */
/*
* Copyright (c) 1980, 1993
@ -259,8 +259,7 @@ whois(const char *query, const char *server, const char *port, int flags)
}
}
fclose(fp);
if (nbuf != NULL)
free(nbuf);
free(nbuf);
if (nhost != NULL) {
error = whois(query, nhost, port, 0);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: xargs.c,v 1.30 2015/10/10 15:52:30 deraadt Exp $ */
/* $OpenBSD: xargs.c,v 1.31 2015/12/09 19:29:49 mmcc Exp $ */
/* $FreeBSD: xargs.c,v 1.51 2003/05/03 19:09:11 obrien Exp $ */
/*-
@ -483,10 +483,8 @@ prerun(int argc, char *argv[])
/*
* Free the input line buffer, if we have one.
*/
if (inpline != NULL) {
free(inpline);
inpline = NULL;
}
free(inpline);
inpline = NULL;
}
static void