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>
Jeff King committed
Sep 11, 2022 at 00:58 UTC
e40d906449950c140ba1e081b647c708d6d2979e
1 file changed
+1
-3
list-objects-filter-options.c
+1
-3
@@ -187,10 +187,8 @@ static int parse_combine_filter(
187
188
cleanup:
189
strbuf_list_free(subspecs);
190
- if (result) {
190
+ if (result)
191
list_objects_filter_release(filter_options);
192
- memset(filter_options, 0, sizeof(*filter_options));
193
- }
192
return result;
193
}
194