]> git.ozlabs.org Git - petitboot/blobdiff - discover/parser.c
discover: Add two missing talloc_free()s
[petitboot] / discover / parser.c
index 74b2559c8ab9776d138bddc7a8ea51ef9625351d..8e767c6727c27f00ddc1ecb5ecaf173d288fdd60 100644 (file)
@@ -5,6 +5,7 @@
 #include <sys/stat.h>
 
 #include "types/types.h"
+#include <file/file.h>
 #include <log/log.h>
 #include <talloc/talloc.h>
 
@@ -12,7 +13,6 @@
 #include "parser.h"
 #include "parser-utils.h"
 #include "paths.h"
-#include "file.h"
 
 struct p_item {
        struct list_item list;
@@ -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;