diff options
-rw-r--r-- | libexec/comsat/comsat.c | 7 | ||||
-rw-r--r-- | libexec/spamd/spamd.c | 8 |
2 files changed, 6 insertions, 9 deletions
diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c index a935a6b031a..e253918ab00 100644 --- a/libexec/comsat/comsat.c +++ b/libexec/comsat/comsat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: comsat.c,v 1.30 2003/09/25 21:44:03 millert Exp $ */ +/* $OpenBSD: comsat.c,v 1.31 2003/09/26 01:58:55 deraadt Exp $ */ /* * Copyright (c) 1980, 1993 @@ -37,7 +37,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)comsat.c 8.1 (Berkeley) 6/4/93";*/ -static char rcsid[] = "$OpenBSD: comsat.c,v 1.30 2003/09/25 21:44:03 millert Exp $"; +static char rcsid[] = "$OpenBSD: comsat.c,v 1.31 2003/09/26 01:58:55 deraadt Exp $"; #endif /* not lint */ #include <sys/limits.h> @@ -191,8 +191,7 @@ doreadutmp(void) struct utmp *u; if ((u = realloc(utmp, nutmpsize)) == NULL) { - if (utmp) - free(utmp); + free(utmp); syslog(LOG_ERR, "%s", strerror(errno)); exit(1); } diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c index cfeb83d5cb3..b8f0b56c925 100644 --- a/libexec/spamd/spamd.c +++ b/libexec/spamd/spamd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spamd.c,v 1.45 2003/09/24 01:14:59 deraadt Exp $ */ +/* $OpenBSD: spamd.c,v 1.46 2003/09/26 01:58:55 deraadt Exp $ */ /* * Copyright (c) 2002 Theo de Raadt. All rights reserved. @@ -138,8 +138,7 @@ grow_obuf(struct con *cp, int off) cp->obuf = NULL; tmp = realloc(cp->obuf, cp->osize + 8192); if (tmp == NULL) { - if (cp->obuf) - free(cp->obuf); + free(cp->obuf); cp->obuf = NULL; cp->osize = 0; cp->obufalloc = 0; @@ -208,8 +207,7 @@ parse_configline(char *line) tmp = realloc(av, (ac + 2048) * sizeof(char *)); if (tmp == NULL) { - if (av) - free(av); + free(av); av = NULL; ac = 0; return (-1); |