| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-4.7 4/7] tools/blktap2: Fix use of uninitialised variable in _tap_list_join3()
 On 4/27/16 12:01 PM, Andrew Cooper wrote:
> Clang points out:
> 
>   tap-ctl-list.c:457:28: error: variable 'entry' is uninitialized when
>   used here [-Werror,-Wuninitialized]
>           for (; *_entry != NULL; ++entry) {
>                                     ^~~~~
> 
> The content of that loop clearly was meant to iterate over _entry rather than
> entry, so is fixed to do so.  This presumably fixes a memory leak when
> tapdisks get orphed, as only the first item on the list got freed.
> 
> There is no use of entry at all.  It is referenced in a
> list_for_each_entry(tl, &tap->list, entry) construct, but this is just a
> member name, and not a reference to local scope variable of the same name.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
Reviewed-by: Doug Goldstein <cardoe@xxxxxxxxx>
-- 
Doug Goldstein
Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |