Bug 251482

Summary: Use after free in confmisc.c
Product: [Fedora] Fedora Reporter: Kjartan Maraas <kmaraas>
Component: alsa-libAssignee: Martin Stransky <stransky>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-13 09:32:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kjartan Maraas 2007-08-09 11:51:22 UTC
Description of problem:

Around line 767 the code looks like this:

        card = snd_card_get_index(str);
        free(str);
        if (card < 0)
                SNDERR("cannot find card '%s'", str);
        return card;
}

The free(str); call should be moved so it's called after finishing using str of
course :-)

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Martin Stransky 2007-08-13 09:32:02 UTC
Thanks for the report. I moved it to upstream and they should fix that for all
distros.

It's ALSA project bug #3300
(https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3300) and you can watch
it there.