qcacmn: Do not free the src buffer in __qdf_nbuf_cat()

It is callers reponsibilty to free the src nbuf if concat succeeds.

Change-Id: Iaf83524924e312bf819483de38603241f45170a5
CRs-Fixed: 2047585
This commit is contained in:
Manjunathappa Prakash
2017-05-15 18:16:22 -07:00
committed by snandini
parent 56e84390e2
commit ad866513f5

View File

@@ -605,8 +605,8 @@ static inline size_t __qdf_nbuf_len(struct sk_buff *skb)
* @dst: Buffer to piggyback into * @dst: Buffer to piggyback into
* @src: Buffer to put * @src: Buffer to put
* *
* Link tow nbufs the new buf is piggybacked into the older one. The older * Concat two nbufs, the new buf(src) is piggybacked into the older one.
* (src) skb is released. * It is callers responsibility to free the src skb.
* *
* Return: QDF_STATUS (status of the call) if failed the src skb * Return: QDF_STATUS (status of the call) if failed the src skb
* is released * is released
@@ -628,11 +628,9 @@ __qdf_nbuf_cat(struct sk_buff *dst, struct sk_buff *src)
if (error) if (error)
return __qdf_to_status(error); return __qdf_to_status(error);
} }
memcpy(skb_tail_pointer(dst), src->data, src->len); memcpy(skb_tail_pointer(dst), src->data, src->len);
skb_put(dst, src->len); skb_put(dst, src->len);
dev_kfree_skb_any(src);
return __qdf_to_status(error); return __qdf_to_status(error);
} }