]> git.ipfire.org Git - thirdparty/git.git/commit - patch-ids.c
add_commit_patch_id(): avoid allocating memory unnecessarily
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 4 May 2017 13:55:38 +0000 (15:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 May 2017 03:18:19 +0000 (12:18 +0900)
commit5748693b9123f55363211d18e8074db5e1b8384e
tree399bd14bc8d4ac40f8426163ba44e500041f5063
parentb6b066adf9e1e970a6d8295db630ab1e1f3bc71c
add_commit_patch_id(): avoid allocating memory unnecessarily

It would appear that we allocate (and forget to release) memory if the
patch ID is not even defined.

Reported by the Coverity tool.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
patch-ids.c