summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorSameeh Jubran <sameehj@amazon.com>2019-05-01 16:47:04 +0300
committerDavid S. Miller <davem@davemloft.net>2019-05-04 00:14:46 -0400
commit8ee8ee7fe87bf64738ab4e31be036a7165608b27 (patch)
treeae13a1cf879eeca8a20b31d777a7140cd40a699f /tools/perf/scripts/python/export-to-postgresql.py
parent3c6eeff295f01bdf1c6c3addcb0a04c0c6c029e9 (diff)
net: ena: fix: set freed objects to NULL to avoid failing future allocations
In some cases when a queue related allocation fails, successful past allocations are freed but the pointer that pointed to them is not set to NULL. This is a problem for 2 reasons: 1. This is generally a bad practice since this pointer might be accidentally accessed in the future. 2. Future allocations using the same pointer check if the pointer is NULL and fail if it is not. Fixed this by setting such pointers to NULL in the allocation of queue related objects. Also refactored the code of ena_setup_tx_resources() to goto-style error handling to avoid code duplication of resource freeing. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com> Signed-off-by: Sameeh Jubran <sameehj@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions