Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/ipf/netinet Checking the return value of an...
details: https://anonhg.NetBSD.org/src/rev/d0dd94f65e0c
branches: trunk
changeset: 327089:d0dd94f65e0c
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Feb 27 01:40:07 2014 +0000
description:
Checking the return value of an allocator works better, when looking at
the stored pointer.
diffstat:
sys/external/bsd/ipf/netinet/ip_nat.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r fb7f12da7914 -r d0dd94f65e0c sys/external/bsd/ipf/netinet/ip_nat.c
--- a/sys/external/bsd/ipf/netinet/ip_nat.c Thu Feb 27 01:31:09 2014 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_nat.c Thu Feb 27 01:40:07 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_nat.c,v 1.10 2013/09/14 11:51:47 martin Exp $ */
+/* $NetBSD: ip_nat.c,v 1.11 2014/02/27 01:40:07 joerg Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -113,7 +113,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.10 2013/09/14 11:51:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.11 2014/02/27 01:40:07 joerg Exp $");
#else
static const char sccsid[] = "@(#)ip_nat.c 1.11 6/5/96 (C) 1995 Darren Reed";
static const char rcsid[] = "@(#)Id: ip_nat.c,v 1.1.1.2 2012/07/22 13:45:27 darrenr Exp";
@@ -7904,13 +7904,13 @@
* the outbound lookup table and the hash chain length for each.
*/
KMALLOCS(newtab[0], nat_t **, newsize * sizeof(nat_t *));
- if (newtab == NULL) {
+ if (newtab[0] == NULL) {
error = 60063;
goto badrehash;
}
KMALLOCS(newtab[1], nat_t **, newsize * sizeof(nat_t *));
- if (newtab == NULL) {
+ if (newtab[1] == NULL) {
error = 60064;
goto badrehash;
}
Home |
Main Index |
Thread Index |
Old Index