Skip to content

Commit

Permalink
cmd/snap-confine: fix usage of undefined pointer
Browse files Browse the repository at this point in the history
The debug() line added a few commits ago was attempting to print the
device major/minor from a structure that was only valid inside the scope
of the `for` loop above.

Fix this by printing the device IDs for the device that we are actually
examining.
  • Loading branch information
mardy committed Jun 29, 2022
1 parent ee10e8a commit dca8e2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/snap-confine/ns-support.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ static bool should_discard_current_ns(dev_t base_snap_dev)
}
}
debug("base snap device %d:%d not found in existing mount ns",
mie->dev_major, mie->dev_minor);
major(base_snap_dev), minor(base_snap_dev));
return true;
}

Expand Down

0 comments on commit dca8e2c

Please sign in to comment.