aboutsummaryrefslogtreecommitdiffstats
path: root/ponymix.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-12-24 11:52:02 -0500
committerDave Reisner <dreisner@archlinux.org>2012-12-24 11:52:02 -0500
commit211029f273d89705f4ae09da7a1baa8bc59f317f (patch)
treeb05d2bf3ab81217a9989c06ce6a455ca5133189e /ponymix.c
parentaaa9ca9cd64b97c00d08edd3d7e3ffe5b0879a60 (diff)
downloadmirror-ponymix-211029f273d89705f4ae09da7a1baa8bc59f317f.tar.gz
mirror-ponymix-211029f273d89705f4ae09da7a1baa8bc59f317f.tar.bz2
mirror-ponymix-211029f273d89705f4ae09da7a1baa8bc59f317f.zip
fix another possible NULL strdup
Diffstat (limited to 'ponymix.c')
-rw-r--r--ponymix.c5
1 files changed, 3 insertions, 2 deletions
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;