]> pilppa.org Git - uci.git/blobdiff - file.c
fold uci_file_cleanup into uci_cleanup
[uci.git] / file.c
diff --git a/file.c b/file.c
index 553e5196355c165edb17adcf34df00d92efc6644..7049b3393d78f29dfc87efecbf22e964bf543c42 100644 (file)
--- a/file.c
+++ b/file.c
  */
 static void uci_file_cleanup(struct uci_context *ctx)
 {
-       struct uci_parse_context *pctx;
-
-       if (ctx->buf) {
-               free(ctx->buf);
-               ctx->buf = NULL;
-               ctx->bufsz = 0;
-       }
-
-       pctx = ctx->pctx;
-       if (!pctx)
-               return;
-
-       ctx->pctx = NULL;
-       if (pctx->package)
-               uci_free_package(&pctx->package);
-
-       if (pctx->buf)
-               free(pctx->buf);
-
-       free(pctx);
 }