]> code.delx.au - pulseaudio/commit
alsa-card: Don't free the modargs in pa__init
authorPeter Meerwald <pmeerw@pmeerw.net>
Fri, 3 Jan 2014 22:21:26 +0000 (23:21 +0100)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Fri, 10 Jan 2014 10:32:36 +0000 (12:32 +0200)
commit56e578c310c120da016051a9af2d01caf4f0a90f
treea7809fb2d9f9398793316085c3ce801da6e9c19c
parent56e007ebfbfecf7047ef4261e5834862a37e5742
alsa-card: Don't free the modargs in pa__init

The modargs are in both cases (a succesfull as well as a failed module
initialization) freed already in pa__done().

To avoid leaking modargs memory before they are assigned to u->modargs, the
code is reorganized to first allocate userdata, and then allocate the modargs.
Local variable ma is not needed anymore.

discussion here
http://lists.freedesktop.org/archives/pulseaudio-discuss/2013-December/019661.html

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Reported-by: poljar (Damir Jelić) <poljarinho@gmail.com>
src/modules/alsa/module-alsa-card.c