From: Jesper Juhl Date: Mon, 27 Jun 2011 22:30:17 +0000 (+0200) Subject: loopback: Fix memory leak in tcm_loop_make_scsi_hba() X-Git-Tag: v3.1-rc1~305^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a57b5d36453cc9335f75ae191ffd682a250d08ba;p=pandora-kernel.git loopback: Fix memory leak in tcm_loop_make_scsi_hba() There is a memory leak in tcm_loop_make_scsi_hba(). If all the strstr() calls return NULL and we end up at return ERR_PTR(-EINVAL); then we'll be leaking the memory previously allocated to tl_hba as that variable goes out of scope. This patch should fix the leak. Signed-off-by: Jesper Juhl Signed-off-by: Dan Carpenter Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed