Implemented manual packfile switching in fast-import.
[gitweb.git] / read-cache.c
index 8ecd826e9c628346365cfd8c913c7a20af0fc76e..c54a61187711087b98138b9598db6353457e4df3 100644 (file)
@@ -1010,7 +1010,7 @@ int write_cache(int newfd, struct cache_entry **cache, int entries)
                if (data &&
                    !write_index_ext_header(&c, newfd, CACHE_EXT_TREE, sz) &&
                    !ce_write(&c, newfd, data, sz))
-                       ;
+                       free(data);
                else {
                        free(data);
                        return -1;