diff options
-rw-r--r-- | 4a-hal/4a-hal-utilities/4a-hal-utilities-data.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c index 0001093..811d11d 100644 --- a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c +++ b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c @@ -56,13 +56,7 @@ struct SpecificHalData *HalUtlAddHalApiToHalList(struct HalMgrData *HalMgrGlobal currentApi = currentApi->next; } - currentApi->apiName = NULL; - currentApi->sndCard = NULL; - currentApi->author = NULL; - currentApi->version = NULL; - currentApi->date = NULL; - - currentApi->next = NULL; + memset(currentApi, 0, sizeof(struct SpecificHalData)); return currentApi; } @@ -93,6 +87,15 @@ uint8_t HalUtlRemoveSelectedHalFromList(struct HalMgrData *HalMgrGlobalData, str } } + if(! matchingApi->internal) { + free(matchingApi->apiName); + free(matchingApi->sndCard); + free(matchingApi->info); + free(matchingApi->author); + free(matchingApi->version); + free(matchingApi->date); + }; + free(matchingApi); return 0; |