From: Lennart Poettering Date: Tue, 20 Jun 2006 21:23:10 +0000 (+0000) Subject: fix segfault when module-alsa-source fails to load X-Git-Tag: 1.0_branch~3473 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84907e6716b83a340c0d5717148d6262fc0f7121;p=profile%2Fivi%2Fpulseaudio.git fix segfault when module-alsa-source fails to load git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1049 fefdeb5f-60dc-0310-8127-8f9354f1896f --- diff --git a/src/modules/module-alsa-sink.c b/src/modules/module-alsa-sink.c index d49b340..9238072 100644 --- a/src/modules/module-alsa-sink.c +++ b/src/modules/module-alsa-sink.c @@ -342,7 +342,7 @@ int pa__init(pa_core *c, pa_module*m) { } period_size = fragsize/frame_size; - u = pa_xmalloc0(sizeof(struct userdata)); + u = pa_xnew0(struct userdata, 1); m->userdata = u; u->module = m; diff --git a/src/modules/module-alsa-source.c b/src/modules/module-alsa-source.c index c4e8689..68c61be 100644 --- a/src/modules/module-alsa-source.c +++ b/src/modules/module-alsa-source.c @@ -335,7 +335,7 @@ int pa__init(pa_core *c, pa_module*m) { } period_size = fragsize/frame_size; - u = pa_xnew(struct userdata, 1); + u = pa_xnew0(struct userdata, 1); m->userdata = u; u->module = m;