list-objects-filter: don't memset after releasing filter struct
If we see an error while parsing a "combine" filter, we call list_objects_filter_release() to free any allocated memory, and then use memset() to return the struct to a known state. But the release function already does that reinitializing. Doing it again is pointless. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
7522bb9bc9
commit
e40d906449
@ -187,10 +187,8 @@ static int parse_combine_filter(
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
strbuf_list_free(subspecs);
|
strbuf_list_free(subspecs);
|
||||||
if (result) {
|
if (result)
|
||||||
list_objects_filter_release(filter_options);
|
list_objects_filter_release(filter_options);
|
||||||
memset(filter_options, 0, sizeof(*filter_options));
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user