Message ID | 20240524194715.695916-7-gitster@pobox.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ee052533bb81aca6f94c0961222bed2a19789dae |
Headers | show |
Series | Fix various overly aggressive protections in 2.45.1 and friends | expand |
diff --git a/hook.c b/hook.c index 632b537b99..fc974cee1d 100644 --- a/hook.c +++ b/hook.c @@ -18,8 +18,10 @@ static int identical_to_template_hook(const char *name, const char *path) found_template_hook = access(template_path.buf, X_OK) >= 0; } #endif - if (!found_template_hook) + if (!found_template_hook) { + strbuf_release(&template_path); return 0; + } ret = do_files_match(template_path.buf, path);