diff options
author | 2012-09-26 12:28:08 +0000 | |
---|---|---|
committer | 2012-09-26 12:28:08 +0000 | |
commit | 4c99c936eab7e56f6c1da03f73b2077dc7499122 (patch) | |
tree | 276ea44828e3d612950538e37b05c5411b21f3ca | |
parent | fix double free() issue in error paths (diff) | |
download | wireguard-openbsd-4c99c936eab7e56f6c1da03f73b2077dc7499122.tar.xz wireguard-openbsd-4c99c936eab7e56f6c1da03f73b2077dc7499122.zip |
maps must be numbered from 1 up, as 0 means "no map".
ok gilles@
-rw-r--r-- | usr.sbin/smtpd/map.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/map.c b/usr.sbin/smtpd/map.c index e2937848535..8c5665814a8 100644 --- a/usr.sbin/smtpd/map.c +++ b/usr.sbin/smtpd/map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: map.c,v 1.30 2012/09/21 10:22:29 eric Exp $ */ +/* $OpenBSD: map.c,v 1.31 2012/09/26 12:28:08 eric Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -150,7 +150,7 @@ map_create(enum map_kind kind, const char *name) m = xcalloc(1, sizeof(*m), "map_create"); m->m_src = kind; - m->m_id = last_map_id++; + m->m_id = ++last_map_id; if (m->m_id == INT_MAX) errx(1, "map_create: too many maps defined"); |