Skip to content
Commit bd110756 authored by Andriy Gelman's avatar Andriy Gelman Committed by Marti Bolivar
Browse files

net: pkt: Fix leak when using shallow clone



Currently a shallow clone of a packet will bump the reference count on
all the fragments. The net_pkt_unref() function, however, only drops the
reference count on the head fragment. Fix this by only bumping the ref
count on the head buf during shallow clone.

Only bumping the ref count of head is more in line with the idea that
head buf is not responsible for the fragments of its child.

Signed-off-by: default avatarAndriy Gelman <andriy.gelman@gmail.com>
(cherry picked from commit f12f9d5e)
parent c0c1390e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment