summaryrefslogtreecommitdiffstats
path: root/src/operations.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2018-07-08 13:37:05 +0200
committerPali Rohár <pali.rohar@gmail.com>2018-07-08 13:37:05 +0200
commit1f01a8330b2578e0430ef0d4d54a9713efa34992 (patch)
tree1dbb9ccdaf1a0e62d10a2c878f60a389f8efba75 /src/operations.c
parent48c6be2d6596f67f335c5a060e84d5db32096c98 (diff)
parentb87411c02fceb03060a56ad2ee0933cd48d8b7d8 (diff)
download0xFFFF-1f01a8330b2578e0430ef0d4d54a9713efa34992.tar.bz2
Merge branch 'master' into maemo
Diffstat (limited to 'src/operations.c')
-rw-r--r--src/operations.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/operations.c b/src/operations.c
index cd7ef44..b3be2c7 100644
--- a/src/operations.c
+++ b/src/operations.c
@@ -91,8 +91,11 @@ clean:
void dev_free(struct device_info * dev) {
- if ( dev->usb )
+ if ( dev->usb ) {
+ if ( dev->usb->flash_device->protocol == FLASH_DISK )
+ disk_exit(dev->usb);
usb_close_device(dev->usb);
+ }
free(dev);
}