Skip to content

Commit 6abb433

Browse files
committed
Fixing Valgrind leak.
1 parent efc67e5 commit 6abb433

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/time_range.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ static bool _z_time_range_parse_duration(const _z_str_se_t *bound, double *durat
8989
buf[len] = '\0';
9090
char *err;
9191
double value = strtod(bound->start, &err);
92+
z_free(buf);
9293
if (value == 0 && *err != '\0') //_z_cptr_char_offset(buf, len))
9394
{
9495
return false;
9596
}
96-
z_free(buf);
9797
value *= multiplier;
9898

9999
// Check for overflow

0 commit comments

Comments
 (0)