Commit a765b9e6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SCSI fixes from James Bottomley:
 "Two small and obvious driver fixes"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: elx: efct: Fix memory leak in efct_hw_parse_filter()
  scsi: target: Fix NULL pointer dereference in core_scsi3_decode_spec_i_port()
parents 11313e2f 2a8a5a5d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1120,7 +1120,7 @@ int
efct_hw_parse_filter(struct efct_hw *hw, void *value)
{
	int rc = 0;
	char *p = NULL;
	char *p = NULL, *pp = NULL;
	char *token;
	u32 idx = 0;

@@ -1132,6 +1132,7 @@ efct_hw_parse_filter(struct efct_hw *hw, void *value)
		efc_log_err(hw->os, "p is NULL\n");
		return -ENOMEM;
	}
	pp = p;

	idx = 0;
	while ((token = strsep(&p, ",")) && *token) {
@@ -1144,7 +1145,7 @@ efct_hw_parse_filter(struct efct_hw *hw, void *value)
		if (idx == ARRAY_SIZE(hw->config.filter_def))
			break;
	}
	kfree(p);
	kfree(pp);

	return rc;
}
+3 −1
Original line number Diff line number Diff line
@@ -1842,6 +1842,8 @@ core_scsi3_decode_spec_i_port(
		}

		kmem_cache_free(t10_pr_reg_cache, dest_pr_reg);

		if (dest_se_deve)
			core_scsi3_lunacl_undepend_item(dest_se_deve);

		if (is_local)