summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <git@arunraghavan.net>2015-08-25 19:37:22 +0530
committerArun Raghavan <git@arunraghavan.net>2015-08-25 19:37:22 +0530
commit4395abd3e5a1d978b72bd7d6ca3ae8a0acdf056e (patch)
tree9c9ddfc69bd903f2568c4634c1306db49bd3df9d
parent5071960bf33efe4889ed920593386c12821d3a11 (diff)
alsa: Allocate only as much space as we need for device port datajackhwmute-review
In the UCM case, we manually allocate and deallocate the device port data, so the "extra data" field needs to just be the size of a pointer, not the whole structure.
-rw-r--r--src/modules/alsa/alsa-ucm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
index c231bb436..86f27faed 100644
--- a/src/modules/alsa/alsa-ucm.c
+++ b/src/modules/alsa/alsa-ucm.c
@@ -769,7 +769,7 @@ static void ucm_add_port_combination(
pa_device_port_new_data_set_description(&port_data, desc);
pa_device_port_new_data_set_direction(&port_data, is_sink ? PA_DIRECTION_OUTPUT : PA_DIRECTION_INPUT);
- port = pa_device_port_new(core, &port_data, sizeof(ucm_port));
+ port = pa_device_port_new(core, &port_data, sizeof(ucm_port *));
pa_device_port_new_data_done(&port_data);
ucm_port = ucm_port_new(context->ucm, port, pdevices, num);