mirror of
https://github.com/Netflix/dial-reference.git
synced 2026-06-08 10:59:59 +00:00
Fix memory leak in dial data. Thanks @vignyzheng for pointing this.
This commit is contained in:
@@ -87,3 +87,15 @@ DIALData *retrieve_dial_data(char *app_name) {
|
||||
return result;
|
||||
}
|
||||
|
||||
void free_dial_data(DIALData **dialData)
|
||||
{
|
||||
DIALData *curNode=NULL;
|
||||
while (*dialData != NULL) {
|
||||
curNode = *dialData;
|
||||
*dialData =curNode->next;
|
||||
|
||||
free(curNode->key);
|
||||
free(curNode->value);
|
||||
free(curNode);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user