summaryrefslogtreecommitdiffstats
path: root/libglusterfsclient/src
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfsclient/src')
-rwxr-xr-xlibglusterfsclient/src/libglusterfsclient.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libglusterfsclient/src/libglusterfsclient.c b/libglusterfsclient/src/libglusterfsclient.c
index 962eb973d..ed0047401 100755
--- a/libglusterfsclient/src/libglusterfsclient.c
+++ b/libglusterfsclient/src/libglusterfsclient.c
@@ -1781,11 +1781,14 @@ glusterfs_umount_all (void)
pthread_mutex_lock (&vmplock);
{
- list_for_each_entry_safe (entry, tmp, &vmplist.list, list) {
- /* even if there are errors, continue with other
- mounts
- */
- _libgf_umount (entry->vmp);
+ if (vmplist.entries > 0) {
+ list_for_each_entry_safe (entry, tmp, &vmplist.list,
+ list) {
+ /* even if there are errors, continue with other
+ mounts
+ */
+ _libgf_umount (entry->vmp);
+ }
}
}
pthread_mutex_unlock (&vmplock);