瀏覽代碼

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);