소스 검색

fix, need free the element which is from malloc

cheyiliu 9 년 전
부모
커밋
b44fb7dcfc
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      doc/utlist.txt

+ 1 - 0
doc/utlist.txt

@@ -228,6 +228,7 @@ int main(int argc, char *argv[]) {
     /* now delete each element, use the safe iterator */
     DL_FOREACH_SAFE(head,elt,tmp) {
       DL_DELETE(head,elt);
+      free(elt);
     }
 
     fclose(file);