summaryrefslogtreecommitdiff
path: root/fixup-builtins
diff options
context:
space:
mode:
authorLibravatar Adeodato Simó <dato@net.com.org.es>2008-12-30 22:01:44 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-01-01 03:31:56 -0800
commitfe73fc1abe785a423fcc51b753d57ffa1485edab (patch)
tree9712bbeb0ffe51d688861553f36645c5ff372907 /fixup-builtins
parentGIT 1.6.1 (diff)
downloadtgif-fe73fc1abe785a423fcc51b753d57ffa1485edab.tar.xz
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ó <dato@net.com.org.es> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fixup-builtins')
0 files changed, 0 insertions, 0 deletions