Re: [U-Boot] [PATCH v2 23/78] net: tsec: Fix memory leak in error path

2018-01-03 Thread Joe Hershberger
On Wed, Dec 13, 2017 at 1:18 AM, Mario Six wrote: > tsec_initialize allocates a private driver structure using malloc. > Should the memory allocation of this private structure fail, the > function execution is aborted with a return 0, but the previously > allocated device

[U-Boot] [PATCH v2 23/78] net: tsec: Fix memory leak in error path

2017-12-12 Thread Mario Six
tsec_initialize allocates a private driver structure using malloc. Should the memory allocation of this private structure fail, the function execution is aborted with a return 0, but the previously allocated device structure is never freed, hence leaked. Free the device structure in the error