diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-12-24 11:52:02 -0500 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2012-12-24 11:52:02 -0500 |
commit | 211029f273d89705f4ae09da7a1baa8bc59f317f (patch) | |
tree | b05d2bf3ab81217a9989c06ce6a455ca5133189e | |
parent | aaa9ca9cd64b97c00d08edd3d7e3ffe5b0879a60 (diff) | |
download | mirror-ponymix-211029f273d89705f4ae09da7a1baa8bc59f317f.tar.gz mirror-ponymix-211029f273d89705f4ae09da7a1baa8bc59f317f.tar.bz2 mirror-ponymix-211029f273d89705f4ae09da7a1baa8bc59f317f.zip |
fix another possible NULL strdup
-rw-r--r-- | ponymix.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |