Skip to content

Commit

Permalink
fuse: fix incorrect use of recover
Browse files Browse the repository at this point in the history
  • Loading branch information
billziss-gh committed Oct 3, 2019
1 parent df2f4be commit f76abb9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fuse/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,9 @@ func hostFsyncdir(path0 *c_char, datasync c_int, fi0 *c_struct_fuse_file_info) (
}

func hostInit(conn0 *c_struct_fuse_conn_info) (user_data unsafe.Pointer) {
defer recover()
defer func() {
recover()
}()
fctx := c_fuse_get_context()
user_data = fctx.private_data
host := hostHandleGet(user_data)
Expand All @@ -419,7 +421,9 @@ func hostInit(conn0 *c_struct_fuse_conn_info) (user_data unsafe.Pointer) {
}

func hostDestroy(user_data unsafe.Pointer) {
defer recover()
defer func() {
recover()
}()
if "netbsd" == runtime.GOOS {
user_data = c_fuse_get_context().private_data
}
Expand Down

0 comments on commit f76abb9

Please sign in to comment.