diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-11-22 14:34:17 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-11-22 14:34:17 +0900 |
| commit | aa1d4b42e51373e87f9d5bb0ede4c2e522a74319 (patch) | |
| tree | b0eafc4ff71a66c4848ccf4b0b481f8140f27afb /submodule.c | |
| parent | Merge branch 'jk/test-malloc-debug-check' (diff) | |
| parent | refspec: store raw refspecs inside refspec_item (diff) | |
| download | git-aa1d4b42e51373e87f9d5bb0ede4c2e522a74319.tar.gz git-aa1d4b42e51373e87f9d5bb0ede4c2e522a74319.zip | |
Merge branch 'jk/fetch-prefetch-double-free-fix'
Double-free fix.
* jk/fetch-prefetch-double-free-fix:
refspec: store raw refspecs inside refspec_item
refspec: drop separate raw_nr count
fetch: adjust refspec->raw_nr when filtering prefetch refspecs
Diffstat (limited to 'submodule.c')
| -rw-r--r-- | submodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/submodule.c b/submodule.c index 74d5766f07..7ec564854d 100644 --- a/submodule.c +++ b/submodule.c @@ -1174,8 +1174,8 @@ static int push_submodule(const char *path, if (remote->origin != REMOTE_UNCONFIGURED) { int i; strvec_push(&cp.args, remote->name); - for (i = 0; i < rs->raw_nr; i++) - strvec_push(&cp.args, rs->raw[i]); + for (i = 0; i < rs->nr; i++) + strvec_push(&cp.args, rs->items[i].raw); } prepare_submodule_repo_env(&cp.env); @@ -1209,8 +1209,8 @@ static void submodule_push_check(const char *path, const char *head, strvec_push(&cp.args, head); strvec_push(&cp.args, remote->name); - for (i = 0; i < rs->raw_nr; i++) - strvec_push(&cp.args, rs->raw[i]); + for (i = 0; i < rs->nr; i++) + strvec_push(&cp.args, rs->items[i].raw); prepare_submodule_repo_env(&cp.env); cp.git_cmd = 1; |
