lkml.org 
[lkml]   [2021]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] cifsd: fix memory leak when loop ends
Date
> 
> Memory is being allocated and if veto_list is zero, the loop breaks without cleaning up the allocated
> memory. In this patch, the length check has been moved before allocation. If loop breaks, the memory
> isn't allocated in the first place. Thus the memory is being protected from leaking.
>
> Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
I will apply. Thanks for your patch!

\
 
 \ /
  Last update: 2021-04-01 10:19    [W:0.045 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site