scst, LUN replacement: Add a missing if-test

This was detected by smatch.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8040 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-03-10 16:31:48 +00:00
parent b80e470e36
commit eb6a056300

View File

@@ -4697,7 +4697,8 @@ int scst_acg_repl_lun(struct scst_acg *acg, struct kobject *parent,
extra_tgt_dev_list_entry) {
scst_free_tgt_dev(tgt_dev);
}
scst_free_acg_dev(acg_dev);
if (acg_dev)
scst_free_acg_dev(acg_dev);
out:
return res;