git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fish: -i option should fail if / is not mountable, but warn about others.
[libguestfs.git]
/
daemon
/
realpath.c
diff --git
a/daemon/realpath.c
b/daemon/realpath.c
index
607381b
..
ea936c6
100644
(file)
--- a/
daemon/realpath.c
+++ b/
daemon/realpath.c
@@
-13,7
+13,7
@@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139,
USA.
+ * Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA.
*/
#include <config.h>
*/
#include <config.h>
@@
-179,7
+179,8
@@
do_case_sensitive_path (const char *path)
}
}
}
}
- close (fd_cwd);
+ if (fd_cwd >= 0)
+ close (fd_cwd);
ret[next] = '\0';
char *retp = strdup (ret);
ret[next] = '\0';
char *retp = strdup (ret);
@@
-190,6
+191,8
@@
do_case_sensitive_path (const char *path)
return retp; /* caller frees */
error:
return retp; /* caller frees */
error:
- close (fd_cwd);
+ if (fd_cwd >= 0)
+ close (fd_cwd);
+
return NULL;
}
return NULL;
}