Merge branch 'mh/for-each-string-list-item-empty-fix'
[gitweb.git] / builtin / clone.c
index f7e17d22951cfd8e498143c009fa0303d0ff8319..dbddd98f80d6660f2cde190a0e121022f079071d 100644 (file)
@@ -25,6 +25,7 @@
 #include "remote.h"
 #include "run-command.h"
 #include "connected.h"
+#include "packfile.h"
 
 /*
  * Overall FIXMEs:
@@ -506,8 +507,8 @@ static void remove_junk(void)
        if (junk_work_tree) {
                strbuf_addstr(&sb, junk_work_tree);
                remove_dir_recursively(&sb, 0);
-               strbuf_reset(&sb);
        }
+       strbuf_release(&sb);
 }
 
 static void remove_junk_on_signal(int signo)