free uci_history entries properly
[project/uci.git] / file.c
diff --git a/file.c b/file.c
index 0a9b180..cb76d97 100644 (file)
--- a/file.c
+++ b/file.c
@@ -749,7 +749,7 @@ int uci_save(struct uci_context *ctx, struct uci_package *p)
                        fprintf(f, "\n");
                else
                        fprintf(f, "=%s\n", h->value);
                        fprintf(f, "\n");
                else
                        fprintf(f, "=%s\n", h->value);
-               uci_list_del(&e->list);
+               uci_free_history(h);
        }
 
 done:
        }
 
 done: