int loop_create(struct lxc_storage *bdev, const char *dest, const char *n,
struct bdev_specs *specs)
{
- __do_free char *srcdev;
+ __do_free char *srcdev = NULL;
const char *fstype;
uint64_t sz;
int ret, len;
char *pathdup, *vg, *lv;
char cmd_output[PATH_MAX];
char sz[24];
- __do_free char *tp;
+ __do_free char *tp = NULL;
struct lvcreate_args cmd_args = {0};
ret = snprintf(sz, 24, "%" PRIu64 "b", size);
#define __LVSCMD "lvs --unbuffered --noheadings -o lv_attr %s 2>/dev/null"
int lvm_compare_lv_attr(const char *path, int pos, const char expected)
{
- __do_free char *cmd;
+ __do_free char *cmd = NULL;
struct lxc_popen_FILE *f;
int ret, status;
size_t len;
/* -B lvm,dir */
if (strchr(type, ',')) {
- __do_free char *dup;
+ __do_free char *dup = NULL;
char *token;
- size_t len;
dup = must_copy_string(type);
lxc_iterate_parts(token, dup, ",") {