summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManjunathappa Prakash <prakashpm@codeaurora.org>2017-05-15 18:16:22 -0700
committerManjunathappa Prakash <prakashpm@codeaurora.org>2017-05-15 19:07:28 -0700
commite435caaa34ccb7fa91fdcb697921a49228f56eae (patch)
tree4c1e16ba95020f23ccdddb9d86149b1995c362ba
parenta3ceb6fd292b84c6459340ae5fe45bc03879b2a4 (diff)
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
-rw-r--r--qdf/linux/src/i_qdf_nbuf.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/qdf/linux/src/i_qdf_nbuf.h b/qdf/linux/src/i_qdf_nbuf.h
index 306dd0b5efd9..cc9aedc9a456 100644
--- a/qdf/linux/src/i_qdf_nbuf.h
+++ b/qdf/linux/src/i_qdf_nbuf.h
@@ -560,8 +560,8 @@ static inline size_t __qdf_nbuf_len(struct sk_buff *skb)
* @dst: Buffer to piggyback into
* @src: Buffer to put
*
- * Link tow nbufs the new buf is piggybacked into the older one. The older
- * (src) skb is released.
+ * Concat two nbufs, the new buf(src) is piggybacked into the older one.
+ * It is callers responsibility to free the src skb.
*
* Return: QDF_STATUS (status of the call) if failed the src skb
* is released
@@ -583,11 +583,9 @@ __qdf_nbuf_cat(struct sk_buff *dst, struct sk_buff *src)
if (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);
- dev_kfree_skb_any(src);
-
return __qdf_to_status(error);
}