diff options
| author | 2022-02-14 18:05:41 -0800 | |
|---|---|---|
| committer | 2022-02-15 14:54:40 +0000 | |
| commit | 7e5b6a5c8c44310784c88c1c198dde79f6402f7b (patch) | |
| tree | 89c5e52eda180af2545df6a5906da19831a26e59 /include/linux/phy/git:/ssh:/git@git.zx2c4.com | |
| parent | net: mscc: ocelot: fix use-after-free in ocelot_vlan_del() (diff) | |
| download | linux-dev-7e5b6a5c8c44310784c88c1c198dde79f6402f7b.tar.xz linux-dev-7e5b6a5c8c44310784c88c1c198dde79f6402f7b.zip | |
mctp: fix use after free
Clang static analysis reports this problem
route.c:425:4: warning: Use of memory after it is freed
trace_mctp_key_acquire(key);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
When mctp_key_add() fails, key is freed but then is later
used in trace_mctp_key_acquire(). Add an else statement
to use the key only when mctp_key_add() is successful.
Fixes: 4f9e1ba6de45 ("mctp: Add tracepoints for tag/key handling")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
