devargs: fix leak on hotplug failure
PATCH 1/1 devargs: fix leak on hotplug failure
Caught by ASan, if a secondary process tried to attach a device with an incorrect driver name, devargs was leaked.
Fixes 64051bb1f144 ("devargs: unify scratch buffer storage")
Signed-off-by David Marchand <[email protected]>
--- lib/eal/common/eal_common_dev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/eal/common/eal_common_dev.c +3 -1
@@ -180,8 +180,10 @@ local_dev_probe(const char *devargs, struct rte_device **new_dev)return ret; err_devarg: -if (rte_devargs_remove (da) !=0 ) +if (rte_devargs_remove (da) !=0 ) {rte_devargs_reset (da); +free (da); + }return ret; }
Signature · 1 line
2.23.0
Quoted 8 lines · David Marchand
Caught by ASan, if a secondary process tried to attach a device with an incorrect driver name, devargs was leaked.
Fixes 64051bb1f144 ("devargs: unify scratch buffer storage")Signed-off-by David Marchand <[email protected]>
Review please?
Signature · 1 line
David Marchand
Quoted 6 lines · David Marchand
Quoted 4 lines · David Marchand
Caught by ASan, if a secondary process tried to attach a device with an incorrect driver name, devargs was leaked.
Quoted 6 lines
Quoted 4 lines
Fixes 64051bb1f144 ("devargs: unify scratch buffer storage")Signed-off-by David Marchand <[email protected]>Review please?
No objection, the fix has been around for one month. Applied.
Signature · 1 line
David Marchand