[alsa-devel] [PATCH 1/2] hda - fix ELD memory leak

Stephen Warren swarren at nvidia.com
Tue Nov 15 19:19:00 CET 2011


Wu Fengguang wrote at Tuesday, November 15, 2011 7:32 AM:
> memset(eld) clears eld->proc_entry which will leak the struct
> snd_info_entry when unloading the module.
>
> Fix it by
> - remove memset(eld)
> - set eld->eld_valid to true _after_ all eld fields have been filled
> - don't access the other eld fields when (eld->eld_valid == false)
>
> Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>

Acked-by: Stephen Warren <swarren at nvidia.com>

-- 
nvpublic



More information about the Alsa-devel mailing list