Re: [PATCH] of: unittest: fix memory leak in unittest_data_add

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

 



> In unittest_data_add, a copy buffer is created via kmemdup. This buffer
> is leaked if of_fdt_unflatten_tree fails. The release for the
> unittest_data buffer is added.

Can a wording like the following be nicer for the change description?

  The buffer “__dtb_testcases_begin” will be duplicated to the local
  variable “unittest_data”. Release the corresponding memory
  after a call of the function “of_fdt_unflatten_tree” failed
  in the implementation of the function “unittest_data_add”.


Regards,
Markus




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux