Commit 62f437b8 authored by Committed by Eric BollengierBrowse files
Fix org#2665 About memory leak on FreeBSD with extended attributes
Extended attributes in FreeBSD exists for attrnamespace "user" and "system". Bacula saves this data serializing extended attributes for every file. In the source bxattr_freebsd.c of bacula 13.0.1 the following problems could be identified: - Bug missing data during backup: If a file has extended attributes of type "system" but not of type "user" then these are missing in the serializing stream for the backup. This is caused by the return statement when no extended attribute of type "user" exists. - Memory leak when using extattr_namespace_to_string() because this function calls strdup() and does never free the memory allocated by strdup(). This problem did not exists until Bacula 7.4.4, but the correct handling was dropped in Bacula 7.4.5. - Memory leak during backup of files having extended attributes of both types "user" and "system". In this case the pointer "xlist" is used first for "user" and then for "s...