Use the _cleanup_blkid_free_probe_ to guarantee that the
blkid_probe will be freed when builtin_blkid exits.
#include "sd-id128.h"
#include "alloc-util.h"
+#include "blkid-util.h"
#include "efivars.h"
#include "fd-util.h"
#include "gpt.h"
int64_t offset = 0;
bool noraid = false;
_cleanup_close_ int fd = -1;
- blkid_probe pr;
+ _cleanup_blkid_free_probe_ blkid_probe pr = NULL;
const char *data;
const char *name;
const char *prtype = NULL;
if (is_gpt)
find_gpt_root(dev, pr, test);
- blkid_free_probe(pr);
out:
if (err < 0)
return EXIT_FAILURE;