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_directx_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_directx_out.c')
-rwxr-xr-x | src/audio_out/audio_directx_out.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/audio_out/audio_directx_out.c b/src/audio_out/audio_directx_out.c index 71bcd7604..54d4d99fd 100755 --- a/src/audio_out/audio_directx_out.c +++ b/src/audio_out/audio_directx_out.c @@ -20,7 +20,7 @@ * audio_directx_out.c, direct sound audio output plugin for xine * by Matthew Grooms <elon@altavista.com> * - * $Id: audio_directx_out.c,v 1.15 2006/07/10 22:08:12 dgp85 Exp $ + * $Id: audio_directx_out.c,v 1.16 2006/07/16 16:18:09 dsalt Exp $ */ /* @@ -793,6 +793,8 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da ao_directx_t *ao_directx; ao_directx = ( ao_directx_t * ) xine_xmalloc( sizeof( ao_directx_t ) ); + if (!ao_directx) + return NULL; lprintf("open_plugin(%08x, %08x) Enter\n", (unsigned long)class_gen, (unsigned long)data); lprintf("open_plugin: ao_directx=%08x\n", (unsigned long)ao_directx); @@ -842,6 +844,8 @@ static void *init_class (xine_t *xine, void *data) { * from this point on, nothing should go wrong anymore */ audiox = (audiox_class_t *) xine_xmalloc (sizeof (audiox_class_t)); + if (!ao_directx) + return NULL; audiox->driver_class.open_plugin = open_plugin; audiox->driver_class.get_identifier = get_identifier; |