035-lfd-undefined-fix.patch 308 B

123456789101112
  1. --- a/src/lxc/bdev.c
  2. +++ b/src/lxc/bdev.c
  3. @@ -1936,3 +1936,3 @@ static int loop_mount(struct bdev *bdev)
  4. {
  5. - int lfd, ffd = -1, ret = -1;
  6. + int lfd = -1, ffd = -1, ret = -1;
  7. struct loop_info64 lo;
  8. @@ -1974,3 +1974,3 @@ out:
  9. if (ret < 0) {
  10. - close(lfd);
  11. + if (lfd > -1) close(lfd);
  12. bdev->lofd = -1;