Re: [PATCH] rpmsg: fix memory leak on channel

2018-09-27 Thread Bjorn Andersson
On Thu 27 Sep 14:36 PDT 2018, Colin King wrote: > From: Colin Ian King > > Currently a failed allocation of channel->name leads to an > immediate return without freeing channel. Fix this by setting > ret to -ENOMEM and jumping to an exit path that kfree's channel. > > Detected by CoverityScan,

[PATCH] rpmsg: fix memory leak on channel

2018-09-27 Thread Colin King
From: Colin Ian King Currently a failed allocation of channel->name leads to an immediate return without freeing channel. Fix this by setting ret to -ENOMEM and jumping to an exit path that kfree's channel. Detected by CoverityScan, CID#1473692 ("Resource Leak") Fixes: 53e2822e56c7 ("rpmsg: Int