summaryrefslogtreecommitdiffstats
path: root/lib/4a-hal-utilities/4a-hal-utilities-data.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/4a-hal-utilities/4a-hal-utilities-data.c')
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-data.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-data.c b/lib/4a-hal-utilities/4a-hal-utilities-data.c
index d7ae1f6..cebc223 100644
--- a/lib/4a-hal-utilities/4a-hal-utilities-data.c
+++ b/lib/4a-hal-utilities/4a-hal-utilities-data.c
@@ -878,6 +878,17 @@ void HalUtlFreeSelectedHalMapDataAllocation(struct InternalHalAlsaMap *halMapDat
free(halMapDataToFree->ctl.name);
+ if(halMapDataToFree->ctl.alsaCtlCreation) {
+ free(halMapDataToFree->ctl.alsaCtlCreation->enums);
+ free(halMapDataToFree->ctl.alsaCtlCreation->dbscale);
+ free(halMapDataToFree->ctl.alsaCtlCreation);
+ }
+ else if(halMapDataToFree->ctl.alsaCtlProperties) {
+ free(halMapDataToFree->ctl.alsaCtlProperties->enums);
+ free(halMapDataToFree->ctl.alsaCtlProperties->dbscale);
+ free(halMapDataToFree->ctl.alsaCtlProperties);
+ }
+
free(halMapDataToFree);
}