31 lines
964 B
Diff
31 lines
964 B
Diff
From 2bc7a785dbd4b882d32e20502d4f3518f8c7610b Mon Sep 17 00:00:00 2001
|
|
From: Thomas Haller <thaller@redhat.com>
|
|
Date: Tue, 3 May 2022 18:59:22 +0200
|
|
Subject: [PATCH 1/1] route: fix crash caused by parse_multipath() by wrong
|
|
free()
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=2081279
|
|
|
|
Fixes: b50be8fa869b ('rtnl/route: use cleanup attribute in "lib/route/route_obj.c"')
|
|
(cherry picked from commit 9b0493646c20f3eecdf664e7e00c6c9162e04fba)
|
|
---
|
|
lib/route/route_obj.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/route/route_obj.c b/lib/route/route_obj.c
|
|
index 4fdd23c19842..9441b77a76e5 100644
|
|
--- a/lib/route/route_obj.c
|
|
+++ b/lib/route/route_obj.c
|
|
@@ -1102,7 +1102,7 @@ static int parse_multipath(struct rtnl_route *route, struct nlattr *attr)
|
|
}
|
|
}
|
|
|
|
- rtnl_route_add_nexthop(route, nh);
|
|
+ rtnl_route_add_nexthop(route, _nl_steal_pointer(&nh));
|
|
tlen -= RTNH_ALIGN(rtnh->rtnh_len);
|
|
rtnh = RTNH_NEXT(rtnh);
|
|
}
|
|
--
|
|
2.35.1
|
|
|