diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-03-15 10:59:08 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-03-15 10:59:08 +0000 |
commit | 90c749aa26efe4ce28cb9b4da6b2d9100c230333 (patch) | |
tree | ef1a4c9b5db463035b3c9b734d832b6df4ffce3d /sys | |
parent | fe3fb7745f411051cf627354098f7d93f1773edc (diff) |
plug memory leak in error path
missing break; in error case
from patrick latifi, cedric ok
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf_ioctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index a86f09d843d..3fcfbc6934c 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.109 2004/03/09 21:44:41 mcbride Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.110 2004/03/15 10:59:07 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1352,8 +1352,10 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) s = splsoftnet(); kif = pfi_lookup_create(ps->state.u.ifname); if (kif == NULL) { + pool_put(&pf_state_pl, state); error = ENOENT; splx(s); + break; } bcopy(&ps->state, state, sizeof(struct pf_state)); bzero(&state->u, sizeof(state->u)); |