[PATCH 2/3] Set err and free ntbl when leaving neightbl_msg_parser

Michele Baldessari michele at acksyn.org
Sat Oct 27 14:38:21 EDT 2012


Make sure we leave neightbl_msg_parser() by setting the proper err variable and
freeing ntbl
---
 lib/route/neightbl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/route/neightbl.c b/lib/route/neightbl.c
index 7725482..1efa5cb 100644
--- a/lib/route/neightbl.c
+++ b/lib/route/neightbl.c
@@ -143,7 +143,7 @@ static int neightbl_msg_parser(struct nl_cache_ops *ops,
 	ntbl->nt_family = rtmsg->rtgen_family;
 
 	if (tb[NDTA_NAME] == NULL) {
-		return -NLE_MISSING_ATTR;
+		err = -NLE_MISSING_ATTR;
 		goto errout;
 	}
 
-- 
1.7.12.1




More information about the libnl mailing list