X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fdevice-handler.c;h=94abb514ab02f4ecd7c6f53aca81a94f7b8afb2f;hp=04a44848d4c452db00e7c9e80cda0b5c6274ac9e;hb=96eedc649c8c0909a564787afebcfbe0588fd651;hpb=e1248d2838676fe39c4aaa43adf120e630e9d387;ds=sidebyside diff --git a/discover/device-handler.c b/discover/device-handler.c index 04a4484..94abb51 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -803,11 +803,12 @@ static int umount_device(struct discover_device *dev) return -1; dev->mounted = false; - talloc_free(dev->mount_path); - dev->mount_path = NULL; pb_rmdir_recursive(mount_base(), dev->mount_path); + talloc_free(dev->mount_path); + dev->mount_path = NULL; + return 0; }