diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-11-11 13:48:35 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2009-11-11 13:48:35 +0000 |
commit | 36b0a223470c06b4001571b920f1051b6382b65b (patch) | |
tree | 96e3d7b8439715a683dc366b3e53740c0971ceb7 | |
parent | 13ab8521bb6379548214d048c7b3bb660a1010a8 (diff) |
Plug two memory leaks in error pathes. Found by parfait. OK henning, jsg
-rw-r--r-- | usr.sbin/bgpd/parse.y | 3 | ||||
-rw-r--r-- | usr.sbin/bgpd/rde.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index af99af689f6..fe1c7361af5 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.238 2009/10/13 09:51:53 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.239 2009/11/11 13:48:34 claudio Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -372,6 +372,7 @@ conf_main : AS as4number { in6->sin6_port = htons(BGP_PORT); break; default: + free(la); yyerror("king bula does not like family %u", $3.af); YYERROR; diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 5d8c49d6523..631b184462e 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.273 2009/11/02 20:38:15 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.274 2009/11/11 13:48:34 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1968,6 +1968,7 @@ rde_dump_ctx_new(struct ctl_show_rib_request *req, pid_t pid, error = CTL_RES_NOSUCHPEER; imsg_compose(ibuf_se_ctl, IMSG_CTL_RESULT, 0, pid, -1, &error, sizeof(error)); + free(ctx); return; } |