We are allocating temporary memory for information about
what to process in this thread, which is not being cleaned
up on thread cancelling.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
int cnt = 0;
struct afi_safi_info *thread_info;
- if (bgp->gr_info[afi][safi].t_route_select)
+ if (bgp->gr_info[afi][safi].t_route_select) {
+ struct thread *t = bgp->gr_info[afi][safi].t_route_select;
+
+ thread_info = THREAD_ARG(t);
+ XFREE(MTYPE_TMP, thread_info);
BGP_TIMER_OFF(bgp->gr_info[afi][safi].t_route_select);
+ }
if (BGP_DEBUG(update, UPDATE_OUT)) {
zlog_debug("%s: processing route for %s : cnt %d", __func__,
/* Delete the graceful restart info */
FOREACH_AFI_SAFI (afi, safi) {
+ struct thread *t;
+
gr_info = &bgp->gr_info[afi][safi];
if (!gr_info)
continue;
BGP_TIMER_OFF(gr_info->t_select_deferral);
+
+ t = gr_info->t_route_select;
+ if (t) {
+ void *info = THREAD_ARG(t);
+
+ XFREE(MTYPE_TMP, info);
+ }
BGP_TIMER_OFF(gr_info->t_route_select);
}