lkml.org 
[lkml]   [2021]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH] function mana_hwc_create_wq leaks memory
    Date
    > From: Dhiraj Shah <find.dhiraj@gmail.com>
    > Sent: Thursday, June 10, 2021 12:53 PM
    > ...
    > Hi Dexuan,
    >
    > Thanks for the feedback.
    >
    > You are right saying ‘mana_hwc_destroy_wq' free’s up the queue.
    >
    > However for example if function 'mana_hwc_alloc_dma_buf' fails it will goto
    > ‘out' and call ‘mana_hwc_destroy_wq', the value 'hwc_wq->gdma_wq' is
    > still not assigned at this point. In the ‘mana_hwc_destroy_wq' function i see

    At this point, hwc_wq->gdma_wq stays with its default value NULL.

    > it checks for 'hwc_wq->gdma_wq' before calling, ‘mana_gd_destroy_queue',
    > which makes me think queue is still not freed.

    IMO the current code is not buggy, though I admit it's not very readable. :-)

    If you're interested, you're welcome to help make it more readable. I'll also
    try to make some time on this.

    Thanks,
    Dexuan
    \
     
     \ /
      Last update: 2021-06-10 22:04    [W:5.159 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site