object-info: init request_info before reading arg

When retrieving object info via capability "object-info", we store the
command args into a requested_info variable, but forget to initialize
it. Initialize the variable before use to prevent unexpected output.

Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jiang Xin 2023-04-02 21:05:57 +08:00 коммит произвёл Junio C Hamano
Родитель 7556e5d737
Коммит dc12ee77ab
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -77,7 +77,7 @@ static void send_info(struct repository *r, struct packet_writer *writer,
int cap_object_info(struct repository *r, struct packet_reader *request)
{
struct requested_info info;
struct requested_info info = { 0 };
struct packet_writer writer;
struct string_list oid_str_list = STRING_LIST_INIT_DUP;