[pulseaudio-tickets] [Bug 95293] Possible memory leak in src/modules/module-filter-apply.c

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 6 06:37:12 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=95293

--- Comment #1 from Arun Raghavan <arun at accosted.net> ---
Hey Sachin, you're right. Looking at the code, you'll also notice that fltr is
being leaked. Would you like to submit a fix for this? It might make sense to
initialise fltr and module_name as NULL, and then just have something like:

    if (something) {
       pa_log(...);
       goto done;
    }

    if (something else) {
       pa_log(...);
       goto done;
    }

done:
    pa_xfree(module_name);
    pa_xfree(fltr);

    return ...

This makes it more likely that we won't miss freeing if we add additional
conditions.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20160506/59a92eb3/attachment.html>


More information about the pulseaudio-bugs mailing list