diff options
| author | Jeff King <peff@peff.net> | 2021-10-18 13:15:37 -0400 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-10-18 13:16:53 -0700 |
| commit | f3af71c947cdf2e5acd16cacf50586b829a68f6e (patch) | |
| tree | 3c1672c317ae47228a344c45e7576d0d1b89bbde /diff.c | |
| parent | gpg-interface: fix leak of "line" in parse_ssh_output() (diff) | |
| download | git-f3af71c947cdf2e5acd16cacf50586b829a68f6e.tar.gz git-f3af71c947cdf2e5acd16cacf50586b829a68f6e.zip | |
gpg-interface: fix leak of strbufs in get_ssh_key_fingerprint()
We read stdout from gpg into a strbuf, then split it into a list of
strbufs, pull out one element, and return it. But we don't free either
the original stdout buffer, nor the list returned from strbuf_split().
This patch fixes both. Note that we have to detach the returned string
from its strbuf before calling strbuf_list_free(), as that would
otherwise throw it away.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions
