rem: tmp = strdup(query);
add: ptr = tmp = strdup(query);
context: static BOOL file_cmp_query(char *file, char *query){	char *tmp, *token;	assert(query);	assert(file);	if (string_isempty(query))		return TRUE;	if (!strchr(query, ' '))		return (strcasestr(file, query) != NULL);		tmp = strdup(query);	while ((token = string_sep(&tmp, " ")))		if (strcasestr(file, token)) {			free(tmp);			return FALSE;		}	free(tmp);	return TRUE;}