pactl: Fix crash with older servers 39/21939/1
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Sun, 16 Feb 2014 12:30:38 +0000 (14:30 +0200)
committerIsmo Puustinen <ismo.puustinen@intel.com>
Wed, 28 May 2014 09:40:03 +0000 (12:40 +0300)
commitde4012223f5e1da43001856259b16a2782d96fbf
tree913a104f6723ec31986c895f33be2a681987b646
parentbc6157b278af4e276316347b51cb176bed3429f9
pactl: Fix crash with older servers

Servers older than 0.9.15 don't know anything about cards, and card
operations will return a NULL pa_operation object when connected to
that old server. We must check the pa_operation pointer before passing
it to pa_operation_unref(), otherwise a NULL operation will result in
a crash.

Change-Id: Idc258479c077aafaff6254b76acb18034a158107
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
src/utils/pactl.c