Commit 7cc1d6c
Maxim Levitsky
net: mana: Fix possible double free in error handling path
JIRA: https://issues.redhat.com/browse/RHEL-54330
commit 1864b82
Author: Ma Ke <make24@iscas.ac.cn>
Date: Tue Jun 25 21:03:14 2024 +0800
net: mana: Fix possible double free in error handling path
When auxiliary_device_add() returns error and then calls
auxiliary_device_uninit(), callback function adev_release
calls kfree(madev). We shouldn't call kfree(madev) again
in the error handling path. Set 'madev' to NULL.
Fixes: a69839d ("net: mana: Add support for auxiliary device")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
Link: https://patch.msgid.link/20240625130314.2661257-1-make24@iscas.ac.cn
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>1 parent 2b1f16b commit 7cc1d6c
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2837 | 2837 | | |
2838 | 2838 | | |
2839 | 2839 | | |
| 2840 | + | |
| 2841 | + | |
2840 | 2842 | | |
2841 | 2843 | | |
2842 | 2844 | | |
| |||
0 commit comments