aports/testing/knot-resolver4/stats-module-memset-upstreams.patch

11 lines
294 B
Diff

--- a/modules/stats/stats.c
+++ b/modules/stats/stats.c
@@ -498,6 +498,7 @@
}
for (size_t i = 0; i < UPSTREAMS_COUNT; ++i) {
struct sockaddr *sa = (struct sockaddr *)&data->upstreams.q.at[i];
+ memset(sa, 0, sizeof(struct sockaddr));
sa->sa_family = AF_UNSPEC;
}
return kr_ok();