diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-02-03 19:38:54 +0000 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-02-22 19:20:32 -0500 |
commit | f170396c14243d307e2f479af142fd7356b3bd2a (patch) | |
tree | f1b031e4a7b985f22a026feb18ae63da616b4527 /scripts/gdb/linux/modules.py | |
parent | 8bfcd1bf867d5fae67ecc553b44d7a29ab66013c (diff) |
scsi: fix memory leak of sdpk on when gd fails to allocate
On an allocation failure of gd, the current exit path is via
out_free_devt which leaves sdpk still allocated and hence it gets
leaked. Fix this by correcting the order of resource free'ing with a
change in the error exit path labels.
Detected by CoverityScan, CID#1399519 ("Resource Leak")
Fixes: 0dba1314d4f81115dc ("scsi, block: fix duplicate bdi name registration crashes")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'scripts/gdb/linux/modules.py')
0 files changed, 0 insertions, 0 deletions