Ying Xue 22e7987ae7 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 <dan.carpenter@oracle.com>
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-04-27 19:08:06 -04:00
..
2014-04-26 12:50:23 -04:00
2014-01-21 18:13:05 -08:00
2014-04-20 18:18:55 -04:00
2014-04-26 12:52:28 -04:00
2014-04-23 14:53:36 -04:00
2014-02-12 19:26:32 -05:00
2013-09-23 16:52:45 -04:00
2013-10-19 19:36:19 -04:00
2014-04-24 16:18:26 -04:00
2014-04-27 19:08:06 -04:00
2013-11-21 13:09:42 -05:00
2014-04-16 15:15:05 -04:00