selinux: fix const qualifier warning
rc-selinux.c: In function ‘selinux_setup’: rc-selinux.c:361:9: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] curr_t = context_type_get(curr_con); ^
This commit is contained in:
parent
b1c3422f45
commit
db4a578273
@ -358,14 +358,13 @@ void selinux_setup(char **argv)
|
||||
goto out;
|
||||
}
|
||||
|
||||
curr_t = context_type_get(curr_con);
|
||||
curr_t = xstrdup(context_type_get(curr_con));
|
||||
if (!curr_t) {
|
||||
context_free(curr_con);
|
||||
free(curr_context);
|
||||
goto out;
|
||||
}
|
||||
|
||||
curr_t = xstrdup(curr_t);
|
||||
/* dont need them anymore so free() now */
|
||||
context_free(curr_con);
|
||||
free(curr_context);
|
||||
|
Loading…
Reference in New Issue
Block a user