lkml.org 
[lkml]   [2012]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 15/76] ALSA: hda - Fix memory leaks at error path in patch_cirrus.c
    Date
    3.6-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Takashi Iwai <tiwai@suse.de>

    commit c5e0b6dbad9b4d18c561af90b384d02373f1c994 upstream.

    The proper destructor should be called at the error path.

    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    sound/pci/hda/patch_cirrus.c | 6 +++---
    1 file changed, 3 insertions(+), 3 deletions(-)

    --- a/sound/pci/hda/patch_cirrus.c
    +++ b/sound/pci/hda/patch_cirrus.c
    @@ -1417,7 +1417,7 @@ static int patch_cs420x(struct hda_codec
    return 0;

    error:
    - kfree(codec->spec);
    + cs_free(codec);
    codec->spec = NULL;
    return err;
    }
    @@ -1974,7 +1974,7 @@ static int patch_cs4210(struct hda_codec
    return 0;

    error:
    - kfree(codec->spec);
    + cs_free(codec);
    codec->spec = NULL;
    return err;
    }
    @@ -1999,7 +1999,7 @@ static int patch_cs4213(struct hda_codec
    return 0;

    error:
    - kfree(codec->spec);
    + cs_free(codec);
    codec->spec = NULL;
    return err;
    }



    \
     
     \ /
      Last update: 2012-10-19 07:21    [W:4.030 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site