summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-01-08 16:02:10 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-01-08 16:02:10 +0000
commit56d5bc728d6be964b2518b252341a78bb3dcfdef (patch)
tree0f58d9397223041c1c5d8c9d5588bcf7fe8197e0 /rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
parentc5a2f543b263eadaa7a61841b22c546274260972 (diff)
downloadrockbox-56d5bc728d6be964b2518b252341a78bb3dcfdef.tar.gz
rockbox-56d5bc728d6be964b2518b252341a78bb3dcfdef.tar.bz2
rockbox-56d5bc728d6be964b2518b252341a78bb3dcfdef.zip
When checking the installed bootloader make sure to properly close the device afterwards. Fixes "No Sansa found" issues on windows as reported in the forums.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19722 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/bootloaderinstallsansa.cpp')
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallsansa.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp b/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
index 9294cdd497..eba607bd2b 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
@@ -219,15 +219,19 @@ BootloaderInstallBase::BootloaderType BootloaderInstallSansa::installed(void)
return BootloaderUnknown;
}
if (sansa_read_partinfo(&sansa,0) < 0) {
+ sansa_close(&sansa);
return BootloaderUnknown;
}
if(is_sansa(&sansa) < 0) {
+ sansa_close(&sansa);
return BootloaderUnknown;
}
if((num = sansa_list_images(&sansa)) == 2) {
+ sansa_close(&sansa);
return BootloaderRockbox;
}
else if(num == 1) {
+ sansa_close(&sansa);
return BootloaderOther;
}
return BootloaderUnknown;