projects
/
feed
/
packages.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge pull request #2126 from lynxis/libmicrohttpd
[feed/packages.git]
/
utils
/
lxc
/
patches
/
035-fix-undefined-lfd.patch
1
--- a/src/lxc/bdev.c
2
+++ b/src/lxc/bdev.c
3
@@ -1939,7 +1939,7 @@ static int find_free_loopdev(int *retfd,
4
5
static int loop_mount(struct bdev *bdev)
6
{
7
- int lfd, ffd = -1, ret = -1;
8
+ int lfd = -1, ffd = -1, ret = -1;
9
struct loop_info64 lo;
10
char loname[100];
11
12
@@ -1977,7 +1977,7 @@ out:
13
if (ffd > -1)
14
close(ffd);
15
if (ret < 0) {
16
- close(lfd);
17
+ if (lfd > -1) close(lfd);
18
bdev->lofd = -1;
19
}
20
return ret;