diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-11-11 13:09:40 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2009-11-11 13:09:40 +0000 |
commit | 973d6aa2c036359ce6864b38454f48e2f42250e0 (patch) | |
tree | 3dddd87ae727c9e006c3d56a4302f9f08c9b669b | |
parent | 422268542ca88652293dd2ac18b11f2cf469142d (diff) |
don't leak memory in an error case.
found by parfait.
-rw-r--r-- | usr.sbin/relayd/relayd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index 68684bb9b5d..7c6f9f3b84b 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.92 2009/08/13 13:51:21 reyk Exp $ */ +/* $OpenBSD: relayd.c,v 1.93 2009/11/11 13:09:39 jsg Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org> @@ -1132,6 +1132,7 @@ protonode_header(enum direction dir, struct protocol *proto, } pn->key = strdup(pk->key); if (pn->key == NULL) { + free(pn); log_warn("out of memory"); return (NULL); } |