From: Sebastian Ott Date: Fri, 11 Sep 2009 08:28:24 +0000 (+0200) Subject: [S390] cio: fix memleak in subchannel validation X-Git-Tag: v2.6.32-rc1~734^2~43 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab6aae09024be1b039df441fa1b64dbe092d0acb;p=pandora-kernel.git [S390] cio: fix memleak in subchannel validation When scanning for new subchannels we have a code path where we allocate memory for a struct subchannel, set the device name (which is dynamically allocated now) and do a check if the underlying device is blacklisted - if so we free the subchannel structure. Since we have not set up refcounting at this stage, the device name's memory is lost. Fix this by moving the dev_set_name after the blacklist test. Note: With this patch the init_name for the console subchannel becomes virtually obsolete. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- Reading git-diff-tree failed