From 211029f273d89705f4ae09da7a1baa8bc59f317f Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Mon, 24 Dec 2012 11:52:02 -0500 Subject: fix another possible NULL strdup --- ponymix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ponymix.c') diff --git a/ponymix.c b/ponymix.c index e98ecf3..efd6843 100644 --- a/ponymix.c +++ b/ponymix.c @@ -268,10 +268,11 @@ static struct io_t *source_new(const pa_source_info *info) static struct io_t *source_output_new(const pa_source_output_info *info) { struct io_t *source; + const char *desc; IO_NEW(source, info, "input"); - source->desc = strdup( - pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_NAME)); + desc = pa_proplist_gets(info->proplist, PA_PROP_APPLICATION_NAME); + source->desc = strdup(desc ? desc : ""); source->op.mute = pa_context_set_source_output_mute; source->op.setvol = pa_context_set_source_output_volume; source->op.move = pa_context_move_source_output_by_index; -- cgit v1.2.3