/* Description: Allocates and returns a string filled with the contents of the &substring_t @s. The caller is responsible for freeing the returned string with kfree().  */
char* match_strdup(const substring_t *s)
/* Description: Allocates and returns a string filled with the contents of the &substring_t @s. The caller is responsible for freeing the returned string with kfree().  */
char* match_strdup(const substring_t *s)
{
	size_t sz = s->to - s->from + 1;
	char *p = kmalloc(sz, GFP_KERNEL);
	if (p)
		match_strlcpy(p, s, sz);
	return p;
}