Skip to content

Commit

Permalink
iscsi class: Fix freeing of skb in get host error path
Browse files Browse the repository at this point in the history
If get_host_stats failes we are using kfree to free the
skb. We should be using kfree_skb.

This patch was made over Christoph's scsi-queue drivers-for-3.17 branch.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Mike Christie authored and Christoph Hellwig committed Aug 4, 2014
1 parent 6f8f31c commit bfb5087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/scsi_transport_iscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3468,7 +3468,7 @@ iscsi_get_host_stats(struct iscsi_transport *transport, struct nlmsghdr *nlh)

err = transport->get_host_stats(shost, buf, host_stats_size);
if (err) {
kfree(skbhost_stats);
kfree_skb(skbhost_stats);
goto exit_host_stats;
}

Expand Down

0 comments on commit bfb5087

Please sign in to comment.