Commit 5fd3e9b
fabrics: fix mem leak at nvmf_connect()
Valgrind revealed a mem leak if nvme_add_ctrl() returns with an
error in nvmf_connect():
==22187== 467 (344 direct, 123 indirect) bytes in 1 blocks are definitely lost in loss record 6 of 6
==22187== at 0x4848C31: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22187== by 0x4887F03: nvme_create_ctrl (tree.c:1454)
==22187== by 0x487CCA2: nvmf_connect (fabrics.c:3396)
==22187== by 0x40A584: fabrics_connect (fabrics.c:681)
==22187== by 0x445E28: handle_plugin (plugin.c:190)
==22187== by 0x407680: main (nvme.c:11085)
Fix the same.
Signed-off-by: Martin George <[email protected]>1 parent 9f84578 commit 5fd3e9b
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3419 | 3419 | | |
3420 | 3420 | | |
3421 | 3421 | | |
| 3422 | + | |
3422 | 3423 | | |
3423 | 3424 | | |
3424 | 3425 | | |
| |||
0 commit comments