Merge pull request #2834 from ethomson/memleak checkout: free last created directory
diff --git a/src/checkout.c b/src/checkout.c
index 73750f7..52a076d 100644
--- a/src/checkout.c
+++ b/src/checkout.c
@@ -2212,6 +2212,7 @@ static void checkout_data_clear(checkout_data *data)
git__free(data->pfx);
data->pfx = NULL;
+ git_buf_free(&data->last_mkdir);
git_buf_free(&data->path);
git_buf_free(&data->tmp);