Commit 4ed97b3c authored by Eric Biggers's avatar Eric Biggers Committed by Linus Torvalds
Browse files

lib/parser.c: switch match_u64int() over to use match_strdup()

parent 30f7bc99
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -166,13 +166,10 @@ static int match_u64int(substring_t *s, u64 *result, int base)
	char *buf;
	int ret;
	u64 val;
	size_t len = s->to - s->from;

	buf = kmalloc(len + 1, GFP_KERNEL);
	buf = match_strdup(s);
	if (!buf)
		return -ENOMEM;
	memcpy(buf, s->from, len);
	buf[len] = '\0';

	ret = kstrtoull(buf, base, &val);
	if (!ret)