X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=parse.c;h=f1d5f8f8a72922a85d511528b58f9796c77c337b;hb=2d262990f5770b402fb83ee194a468e31dc8600d;hp=8aaf7992754f1de3e42211a1e3b9c1ef05eddb06;hpb=184b4098cccb8392eb8ecdd23cdc6597b540df36;p=fio.git diff --git a/parse.c b/parse.c index 8aaf7992..f1d5f8f8 100644 --- a/parse.c +++ b/parse.c @@ -180,6 +180,7 @@ static unsigned long long __get_mult_bytes(const char *p, void *data, pow = 1; else if (!strcmp("%", c)) { *percent = 1; + free(c); return ret; } @@ -219,7 +220,7 @@ static unsigned long long get_mult_bytes(const char *str, int len, void *data, /* * Convert string into a floating number. Return 1 for success and 0 otherwise. */ -int str_to_float(const char *str, double *val) +static int str_to_float(const char *str, double *val) { return (1 == sscanf(str, "%lf", val)); }