[PATCH 1/2] audio_out: Handle strdup()'s return value correctly [CORRECTIVE]

Heikki Orsila heikki.orsila at iki.fi
Sun Aug 30 19:49:57 UTC 2009


---
 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


--tqI+Z3u+9OQ7kwn0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename="0002-Make-driver-specific-options-configurable.patch"



More information about the pkg-xiph-maint mailing list