From: Adeodato Simó Date: Tue, 30 Dec 2008 21:01:44 +0000 (+0100) Subject: builtin-shortlog.c: use string_list_append(), and don't strdup unnecessarily X-Git-Tag: v1.6.2-rc0~158^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/fe73fc1abe785a423fcc51b753d57ffa1485edab?hp=fe73fc1abe785a423fcc51b753d57ffa1485edab builtin-shortlog.c: use string_list_append(), and don't strdup unnecessarily Make insert_one_record() use string_list_append(), instead of duplicating its code. Because of this, do not free the "util" member when clearing the "onelines" string lists: with the new code path it is not initialized to any value (was being initialized to NULL previously). Also, avoid unnecessary strdup() calls when inserting names in log->list. This list always has "strdup_strings" activated, hence strdup'ing namebuf is unnecessary. This change also removes a latent memory leak in the old code. NB: The duplicated code mentioned above predated the appearance of string_list_append(). Signed-off-by: Adeodato Simó Signed-off-by: Junio C Hamano ---