From c57a76a97512d909163da5393e91af4dd8243fb8 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sun, 16 Jul 2006 16:18:09 +0000 Subject: 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 --- src/audio_out/audio_pulse_out.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/audio_out/audio_pulse_out.c') diff --git a/src/audio_out/audio_pulse_out.c b/src/audio_out/audio_pulse_out.c index 08fe731e6..52eed33bb 100644 --- a/src/audio_out/audio_pulse_out.c +++ b/src/audio_out/audio_pulse_out.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2006 the xine project * * This file is part of xine, a free video player. * @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: audio_pulse_out.c,v 1.1 2006/07/11 05:20:32 dgp85 Exp $ + * $Id: audio_pulse_out.c,v 1.2 2006/07/16 16:18:09 dsalt Exp $ * * ao plugin for pulseaudio (rename of polypaudio): * http://0pointer.de/lennart/projects/pulsaudio/ @@ -466,6 +466,8 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da lprintf ("audio_pulse_out: open_plugin called\n"); this = (pulse_driver_t *) xine_xmalloc (sizeof (pulse_driver_t)); + if (!this) + return NULL; this->xine = class->xine; /* @@ -557,6 +559,8 @@ static void *init_class (xine_t *xine, void *data) { lprintf ("audio_pulse_out: init class\n"); this = (pulse_class_t *) xine_xmalloc (sizeof (pulse_class_t)); + if (!this) + return NULL; this->driver_class.open_plugin = open_plugin; this->driver_class.get_identifier = get_identifier; -- cgit v1.2.3