Skip to content

Commit 61caf83

Browse files
committed
Fix bugs in distribution_get_buckets_boundaries function
1 parent 6e94531 commit 61caf83

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/daemon/distribution.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ struct distribution_s {
4141
};
4242

4343
double *distribution_get_buckets_boundaries(distribution_t *d) {
44+
if (d == NULL) {
45+
errno = EINVAL;
46+
return NULL;
47+
}
48+
4449
double *boundaries = calloc(d->num_buckets, sizeof(double));
4550

4651
if (boundaries == NULL) {

0 commit comments

Comments
 (0)