Fix a few other static code checker spotted "issues"
[fio.git] / parse.c
diff --git a/parse.c b/parse.c
index 8aaf7992754f1de3e42211a1e3b9c1ef05eddb06..f1d5f8f8a72922a85d511528b58f9796c77c337b 100644 (file)
--- 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));
 }