From 19f07a23f4f9e641e9d208930a346c3642c2869b Mon Sep 17 00:00:00 2001
From: Heikki Orsila <heikki.orsila@iki.fi>
Date: Sun, 30 Aug 2009 22:49:57 +0300
Subject: [PATCH 1/2] audio_out: Handle strdup()'s return value correctly [CORRECTIVE]

---
 src/audio_out.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/audio_out.c b/src/audio_out.c
index 88660c0..6e39047 100644
--- a/src/audio_out.c
+++ b/src/audio_out.c
@@ -613,6 +613,7 @@ int ao_append_option(ao_option **options, const char *key, const char *value)
 
 	op->key = strdup(key);
 	op->value = strdup(value);
+	if (op->key == NULL || op->value == NULL) return 0;
 	op->next = NULL;
 
 	if ((list = *options) != NULL) {
-- 
1.6.1.2


