From: Ying Xue Date: Fri, 25 Apr 2014 02:44:15 +0000 (+0800) Subject: tipc: fix a possible memory leak X-Git-Tag: omap-for-v3.16/fixes-against-rc1~36^2~314 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22e7987ae7d8d13beeaf0717215800f7e803ddcf;p=pandora-kernel.git tipc: fix a possible memory leak The commit a8b9b96e959f3c035af20b1bd2ba67b0b7269b19 ("tipc: fix race in disc create/delete") leads to the following static checker warning: net/tipc/discover.c:352 tipc_disc_create() warn: possible memory leak of 'req' The risk of memory leak really exists in practice. Especially when it's failed to allocate memory for "req->buf", tipc_disc_create() doesn't free its allocated memory, instead just directly returns with ENOMEM error code. In this situation, memory leak, of course, happens. Reported-by: Dan Carpenter Signed-off-by: Ying Xue Signed-off-by: David S. Miller --- Reading git-diff-tree failed