dial-reference icon indicating copy to clipboard operation
dial-reference copied to clipboard

dial data lost & memory leakage

Open vignyzheng opened this issue 8 years ago • 2 comments

hi, There is a memory leakage in file dial_server.c line 388, app->dial_data is a linked list. should use : 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); } }

when free the dial data , it should retrieve in line 206 when call handle_app_status(), using app->dial_data=retrieve_dial_data() before using it. And after using up it in line 225, should free again.

vignyzheng avatar Dec 21 '17 09:12 vignyzheng

Checkout this change which fixes this leak. https://github.com/Netflix/dial-reference/commit/b16d9e97a69fa466ee3be065c41eda8276ba8e78

Let me know if this fixes issues on your side. @vignyzheng

chintan09 avatar Dec 22 '17 00:12 chintan09

Resolved with fc267fac62ae6f8771b10a2c0fedcbd5cceb8545

chintan09 avatar Dec 24 '17 00:12 chintan09