for (namespace_index = 0; namespace_index < sizeof(os_default_xattr_namespaces) / sizeof(int); namespace_index++) {
attrnamespace = os_default_xattr_namespaces[namespace_index];
- /*
- * Convert the numeric attrnamespace into a string representation and make a private copy of that string.
- * The extattr_namespace_to_string functions returns a strdupped string which we need to free.
- */
- if (extattr_namespace_to_string(attrnamespace, ¤t_attrnamespace) != 0) {
- Mmsg2(jcr->errmsg, _("Failed to convert %d into namespace on file \"%s\"\n"),
- attrnamespace, jcr->last_fname);
- Dmsg2(100, "Failed to convert %d into namespace on file \"%s\"\n",
- attrnamespace, jcr->last_fname);
- goto bail_out;
- }
-
/*
* First get the length of the available list with extended attributes.
* If we get EPERM on system namespace, don't return error.
#endif
case EPERM:
if (attrnamespace == EXTATTR_NAMESPACE_SYSTEM) {
- actuallyfree(current_attrnamespace);
- current_attrnamespace = NULL;
continue;
}
/*
}
xattr_list[xattr_list_len] = '\0';
+ /*
+ * Convert the numeric attrnamespace into a string representation and make a private copy of that string.
+ * The extattr_namespace_to_string functions returns a strdupped string which we need to free.
+ */
+ if (extattr_namespace_to_string(attrnamespace, ¤t_attrnamespace) != 0) {
+ Mmsg2(jcr->errmsg, _("Failed to convert %d into namespace on file \"%s\"\n"),
+ attrnamespace, jcr->last_fname);
+ Dmsg2(100, "Failed to convert %d into namespace on file \"%s\"\n",
+ attrnamespace, jcr->last_fname);
+ goto bail_out;
+ }
+
/*
* Walk the list of extended attributes names and retrieve the data.
* We already count the bytes needed for serializing the stream later on.