diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-08-04 16:39:30 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-08-04 16:39:30 +0000 |
commit | 46091a9237f17f4295dca7140d8d70b4fce8b357 (patch) | |
tree | 1c600cd6e1801586abfb66d767f2cd96e15c819c /polyp/sink-input.c | |
parent | 24291aff27c671c11619684cb10d3b36fdf87c0d (diff) |
introduce pa_xmalloc() and friends
implement module auto loading
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@103 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/sink-input.c')
-rw-r--r-- | polyp/sink-input.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/polyp/sink-input.c b/polyp/sink-input.c index 25d8022f..04a2f020 100644 --- a/polyp/sink-input.c +++ b/polyp/sink-input.c @@ -30,6 +30,7 @@ #include "sink-input.h" #include "sample-util.h" +#include "xmalloc.h" #define CONVERT_BUFFER_LENGTH 4096 @@ -44,9 +45,8 @@ struct pa_sink_input* pa_sink_input_new(struct pa_sink *s, const char *name, con if (!(resampler = pa_resampler_new(spec, &s->sample_spec))) return NULL; - i = malloc(sizeof(struct pa_sink_input)); - assert(i); - i->name = name ? strdup(name) : NULL; + i = pa_xmalloc(sizeof(struct pa_sink_input)); + i->name = pa_xstrdup(name); i->client = NULL; i->owner = NULL; i->sink = s; @@ -88,8 +88,8 @@ void pa_sink_input_free(struct pa_sink_input* i) { if (i->resampler) pa_resampler_free(i->resampler); - free(i->name); - free(i); + pa_xfree(i->name); + pa_xfree(i); } void pa_sink_input_kill(struct pa_sink_input*i) { |