replace: plug a memory leak
Recent update to for_each_replace_name() to make it use a strbuf in place of a fixed buffer forgot to release the memory held by the strbuf before leaving the function. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
6a97da3964
commit
372b050b6b
@ -120,6 +120,7 @@ static int for_each_replace_name(const char **argv, each_replace_name_fn fn)
|
|||||||
if (fn(full_hex, ref.buf, &oid))
|
if (fn(full_hex, ref.buf, &oid))
|
||||||
had_error = 1;
|
had_error = 1;
|
||||||
}
|
}
|
||||||
|
strbuf_release(&ref);
|
||||||
return had_error;
|
return had_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user