From: Jeff King Date: Thu, 15 May 2014 08:34:18 +0000 (-0400) Subject: get_helper: use run-command's internal argv_array X-Git-Tag: v2.1.0-rc0~131^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e0ab2ac6c553cbba5d0275cfd35beb3351cae034?hp=e0ab2ac6c553cbba5d0275cfd35beb3351cae034 get_helper: use run-command's internal argv_array The get_helper functions dynamically allocates an argv_array, feeds it to start_command, and then returns. We then have to later clean up the memory manually after calling finish_command. We can make this simpler by just using run-command's internal argv_array, which handles cleanup for us. This also prevents a memory leak in the case that transport_take_over is used, in which case we free the child in finish_connect, which does not manually free the array. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano ---