diff options
author | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-05-25 17:55:57 +0200 |
---|---|---|
committer | Thierry Bultel <thierry.bultel@iot.bzh> | 2018-05-25 17:55:57 +0200 |
commit | f2e39712c5fd8d99862ead9138751fa7c2c7da5d (patch) | |
tree | 74034f7d120449b422d9d03c4ca487dcba5393d2 /plugins/alsa | |
parent | 20565f33285d73b60adb9d53574d71bff268969f (diff) |
alsa-api-zones: fixed sigsegv on channel parsing
Diffstat (limited to 'plugins/alsa')
-rw-r--r-- | plugins/alsa/alsa-api-zones.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/alsa/alsa-api-zones.c b/plugins/alsa/alsa-api-zones.c index 27bf72a..47027dc 100644 --- a/plugins/alsa/alsa-api-zones.c +++ b/plugins/alsa/alsa-api-zones.c @@ -27,10 +27,11 @@ extern Lua2cWrapperT Lua2cWrap; STATIC int ProcessOneChannel(CtlSourceT *source, const char* uid, json_object *channelJ, AlsaPcmChannelT *channel) { const char*channelUid; - int error = wrap_json_unpack(channelJ, "{ss,si,s?i !}", "target", &channelUid, "channel", &channel->port); + int error = wrap_json_unpack(channelJ, "{ss,si !}", "target", &channelUid, "channel", &channel->port); if (error) goto OnErrorExit; channel->uid = strdup(channelUid); + return 0; OnErrorExit: |