From: Sagi Grimberg Date: Wed, 20 May 2015 09:38:58 +0000 (+0300) Subject: iscsi: Fix iscsi endpoints leak X-Git-Tag: omap-for-v4.3/legacy-v2-signed~180^2~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ce30874f561faa15e87fcf0592eee14c26cb78b;p=pandora-kernel.git iscsi: Fix iscsi endpoints leak When creating a new endpoint, we look for a free id for the new endpoint. We baisically loop on possible ids and use the first id that class_find_device() returns NULL. However, we are missing a reference put when class_find_device() does find an existing device for a given id. Reported-by: Alex Lyakas Signed-off-by: Sagi Grimberg Reviewed-by: Mike Christie Signed-off-by: James Bottomley --- Reading git-diff-tree failed