[PATCH 1/2] memblock: fix memory leak when pa_shm_create_rw fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 15, 2011 at 03:36:51PM +0800, Maarten Bosmans wrote:
> Good catch!
> 
> An alternative solution (and IMHO better one) would be to move the two
> lines allocating the mutex and semaphore below the if-block that can
> return. That way you avoid the memory-leak situation alltogether.

Thanks for the suggestion, I decided to move it a bit lower because
lines around the if statement are all about blocks related. ;)

Please see the attachment.

-- 
guanqun


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux