diff options
author | Jeremy Katz <katzj@redhat.com> | 2003-10-13 21:22:28 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2003-10-13 21:22:28 +0000 |
commit | c4ab01b36507a4e50e59c9c0adc06dcb5e587b60 (patch) | |
tree | 2ff871aab96aa28e3d8c64903ef9b7342737192d /loader2/method.c | |
parent | b6a6e44315ec0bebd745fc3b485ee04be263a5e5 (diff) | |
download | anaconda-c4ab01b36507a4e50e59c9c0adc06dcb5e587b60.tar.gz anaconda-c4ab01b36507a4e50e59c9c0adc06dcb5e587b60.tar.xz anaconda-c4ab01b36507a4e50e59c9c0adc06dcb5e587b60.zip |
make sure loopfd is still open so we can close it in an error case (#106615)
Diffstat (limited to 'loader2/method.c')
-rw-r--r-- | loader2/method.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/loader2/method.c b/loader2/method.c index 37b95886c..0a9694462 100644 --- a/loader2/method.c +++ b/loader2/method.c @@ -118,8 +118,6 @@ int mountLoopback(char * fsystem, char * mntpoint, char * device) { return LOADER_ERROR; } - close(loopfd); - if (doPwMount(filename, mntpoint, "iso9660", 1, 0, NULL, NULL, 0, 0)) { if (doPwMount(filename, mntpoint, "ext2", 1, @@ -129,11 +127,14 @@ int mountLoopback(char * fsystem, char * mntpoint, char * device) { logMessage("failed to mount loop: %s", strerror(errno)); ioctl(loopfd, LOOP_CLR_FD, 0); + close(loopfd); return LOADER_ERROR; } } } + close(loopfd); + return 0; } |