Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b30c516f authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: fix __dst_destroy_metrics_generic()



dst_default_metrics is readonly, we dont want to kfree() it later.

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 19694ac8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -315,7 +315,7 @@ void __dst_destroy_metrics_generic(struct dst_entry *dst, unsigned long old)
{
	unsigned long prev, new;

	new = (unsigned long) dst_default_metrics;
	new = ((unsigned long) dst_default_metrics) | DST_METRICS_READ_ONLY;
	prev = cmpxchg(&dst->_metrics, old, new);
	if (prev == old)
		kfree(__DST_METRICS_PTR(old));