{
/* Set the modified context back to the file. */
bool fail = fsetfilecon (ofd, con) != 0;
+ freecon (con);
+
/* See https://debbugs.gnu.org/11245 for ENOTSUP. */
if (fail
#if defined HAVE_ANDROID && !defined ANDROID_STUBIFY
#endif /* defined HAVE_ANDROID && !defined ANDROID_STUBIFY */
&& errno != ENOTSUP)
report_file_error ("Doing fsetfilecon", newname);
-
- freecon (con);
}
#endif
fail = (lsetfilecon (SSDATA (encoded_absname),
context_str (parsed_con))
!= 0);
+ context_free (parsed_con);
+ freecon (con);
+
/* See https://debbugs.gnu.org/11245 for ENOTSUP. */
if (fail && errno != ENOTSUP)
report_file_error ("Doing lsetfilecon", absname);
-
- context_free (parsed_con);
- freecon (con);
return fail ? Qnil : Qt;
}
else