We allocated and own the string, so we can free it!
sna_display.c: In function 'sna_output_get_modes':
sna_display.c:2314:4: warning: passing argument 1 of 'free' discards 'const' qualifier from pointer target type [enabled by default]
free(current->name);
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
if (current && (current->name == NULL || *current->name == '\0')) {
char *str = canonical_mode_name(current);
if (str) {
- free(current->name);
+ free((char *)current->name);
current->name = str;
}
}