diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2006-07-16 16:18:09 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2006-07-16 16:18:09 +0000 |
commit | c57a76a97512d909163da5393e91af4dd8243fb8 (patch) | |
tree | 30f239f04ca24b5c7e66365fc2ba53bddc768005 /src/audio_out/audio_coreaudio_out.c | |
parent | 2abc9b2aecac443cdcdf040818550ed641861543 (diff) | |
download | xine-lib-c57a76a97512d909163da5393e91af4dd8243fb8.tar.gz xine-lib-c57a76a97512d909163da5393e91af4dd8243fb8.tar.bz2 |
malloc cleanups (based on a patch from Chris Brien).
Also use asprintf() where appropriate, since we now have our own version for
where it's not present.
CVS patchset: 8130
CVS date: 2006/07/16 16:18:09
Diffstat (limited to 'src/audio_out/audio_coreaudio_out.c')
-rw-r--r-- | src/audio_out/audio_coreaudio_out.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/audio_out/audio_coreaudio_out.c b/src/audio_out/audio_coreaudio_out.c index ab3b022c7..80cab6d71 100644 --- a/src/audio_out/audio_coreaudio_out.c +++ b/src/audio_out/audio_coreaudio_out.c @@ -529,6 +529,8 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, lprintf ("open_plugin called\n"); this = (coreaudio_driver_t *) xine_xmalloc (sizeof (coreaudio_driver_t)); + if (!this) + return NULL; this->xine = class->xine; this->capabilities = AO_CAP_MODE_MONO | AO_CAP_MODE_STEREO; @@ -579,6 +581,8 @@ static void *init_class (xine_t *xine, void *data) { lprintf ("init class\n"); this = (coreaudio_class_t *) xine_xmalloc (sizeof (coreaudio_class_t)); + if (!this) + return NULL; this->driver_class.open_plugin = open_plugin; this->driver_class.get_identifier = get_identifier; |