]> Git Repo - qemu.git/blobdiff - block/vvfat.c
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vnc-3' into staging
[qemu.git] / block / vvfat.c
index 811b39c1ca0708f60d77f1d7aae46aeb0d24c3f4..3cda19f2f3b9c5153d1baa2325af20e75246490f 100644 (file)
@@ -787,7 +787,9 @@ static int read_directory(BDRVVVFATState* s, int mapping_index)
            s->current_mapping->path=buffer;
            s->current_mapping->read_only =
                (st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) == 0;
-       }
+        } else {
+            g_free(buffer);
+        }
     }
     closedir(dir);
 
@@ -1866,7 +1868,7 @@ static int check_directory_consistency(BDRVVVFATState *s,
 
        if (s->used_clusters[cluster_num] & USED_ANY) {
            fprintf(stderr, "cluster %d used more than once\n", (int)cluster_num);
-           return 0;
+            goto fail;
        }
        s->used_clusters[cluster_num] = USED_DIRECTORY;
 
This page took 0.024241 seconds and 4 git commands to generate.