aboutsummaryrefslogtreecommitdiffstats
path: root/lib/4a-hal-utilities
diff options
context:
space:
mode:
Diffstat (limited to 'lib/4a-hal-utilities')
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h2
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-data.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h b/lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h
index 88b3e44..d548c73 100644
--- a/lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h
+++ b/lib/4a-hal-utilities/4a-hal-utilities-alsa-data.h
@@ -53,7 +53,7 @@ struct InternalHalAlsaCtl {
int numid;
int value;
- struct InternalHalAlsaCtlProperties alsaCtlProperties;
+ struct InternalHalAlsaCtlProperties *alsaCtlProperties;
struct InternalHalAlsaCtlProperties *alsaCtlCreation;
};
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);
}