X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=discover%2Fparser.c;h=fbf31b2806060009a4d136906fc5b03be64917dc;hb=d531395a3ff60730238854b127925978f6eab289;hp=74b2559c8ab9776d138bddc7a8ea51ef9625351d;hpb=4896183708855fbfd0aa892537fbcc17ed7eb971;p=petitboot diff --git a/discover/parser.c b/discover/parser.c index 74b2559..fbf31b2 100644 --- a/discover/parser.c +++ b/discover/parser.c @@ -5,6 +5,7 @@ #include #include "types/types.h" +#include #include #include @@ -12,7 +13,6 @@ #include "parser.h" #include "parser-utils.h" #include "paths.h" -#include "file.h" struct p_item { struct list_item list; @@ -25,7 +25,7 @@ static char *local_path(struct discover_context *ctx, struct discover_device *dev, const char *filename) { - return join_paths(ctx, dev->mount_path, filename); + return join_paths(ctx, dev->root_path, filename); } int parser_request_file(struct discover_context *ctx, @@ -62,6 +62,7 @@ int parser_check_dir(struct discover_context *ctx, path = local_path(ctx, dev, dirname); rc = stat(path, &statbuf); + talloc_free(path); if (!rc) return -1;