Fix mounting on FreeBSD
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Sun, 11 Nov 2018 10:46:14 +0000 (14:46 +0400)
committerNikolaus Rath <Nikolaus@rath.org>
Sun, 11 Nov 2018 19:40:25 +0000 (19:40 +0000)
commit11d9ed614f9000cff349f077983e83b7901e7ed2
tree98c535713cd93e234593b50b8c9bb915e4e147a6
parent70e25ea74e011d73887f4f66842b204fb4504c97
Fix mounting on FreeBSD

Currently, mounting on FreeBSD fails like this:

 mount_fusefs: ZZZZ<snip> on /mountpoint: No such file or directory

This happens because right after doing argv[a++] = fdnam it's
getting freed before calling execvp().

So move this free() call after execvp(). Also, when asprintf()
fails for fdnam, close device fd before calling exit().
lib/mount_bsd.c