summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-06-01 19:06:36 +0100
committerDoug Ledford <dledford@redhat.com>2016-06-06 19:22:18 -0400
commit0147ebcf8927f09e1923114092f6b14c1de75a95 (patch)
treef11bcfbdf15e37a0998c16ebdde94ad070448350 /Documentation
parentda1f857be62ca0472024da37eab068b3b8ce0a15 (diff)
IB/core: fix null pointer deref and mem leak in error handling
The current error handling in setup_hw_stats has a couple of issues. It is possible to generate a null pointer deference on the kfree of hsag->attrs[i] because two of the early error exit paths jump to the kfree when hsags NULL and not allocated. Fix this by moving the kfree on stats and jumping to that, avoiding the hsag freeing. Secondly, there is a memory leak of stats if the hsag allocation fails; instead of returning, jump to the kfree on stats. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions