1
0

qcacmn: fix double nbuf allocation false positive

In qdf_nbuf_queue_free API __qdf_nbuf_free API is
called to free the nbuf which is not clearing the debug
node instead call qdf_nbuf_free API to delete the nbuf
debug node and free nbuf

Change-Id: I34f06a440ce7758d4ea02fbd1d696366460aa871
Este cometimento está contido em:
Chaithanya Garrepalli
2020-09-11 14:03:36 +05:30
cometido por snandini
ascendente 1c50a00210
cometimento 96d7fbafaf
2 ficheiros modificados com 4 adições e 18 eliminações

Ver ficheiro

@@ -2203,7 +2203,10 @@ qdf_nbuf_queue_append(qdf_nbuf_queue_t *dest, qdf_nbuf_queue_t *src)
static inline void static inline void
qdf_nbuf_queue_free(qdf_nbuf_queue_t *head) qdf_nbuf_queue_free(qdf_nbuf_queue_t *head)
{ {
__qdf_nbuf_queue_free(head); qdf_nbuf_t buf = NULL;
while ((buf = qdf_nbuf_queue_remove(head)) != NULL)
qdf_nbuf_free(buf);
} }
static inline qdf_nbuf_t static inline qdf_nbuf_t

Ver ficheiro

@@ -1736,23 +1736,6 @@ struct sk_buff *__qdf_nbuf_queue_remove(__qdf_nbuf_queue_t *qhead)
return tmp; return tmp;
} }
/**
* __qdf_nbuf_queue_free() - free a queue
* @qhead: head of queue
*
* Return: QDF status
*/
static inline QDF_STATUS
__qdf_nbuf_queue_free(__qdf_nbuf_queue_t *qhead)
{
__qdf_nbuf_t buf = NULL;
while ((buf = __qdf_nbuf_queue_remove(qhead)) != NULL)
__qdf_nbuf_free(buf);
return QDF_STATUS_SUCCESS;
}
/** /**
* __qdf_nbuf_queue_first() - returns the first skb in the queue * __qdf_nbuf_queue_first() - returns the first skb in the queue
* @qhead: head of queue * @qhead: head of queue