From 0e6ef452898063245330011c3bc0a9c5676abd9e Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Mon, 21 Dec 2009 10:05:45 +0100 Subject: [PATCH] Try to fix problem on FreeBSD with unsupported extended attributes which gives lots of orphaned buffers as seen in regression testing. --- bacula/src/filed/xattr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bacula/src/filed/xattr.c b/bacula/src/filed/xattr.c index c1f9f715d3..457f1c3c07 100644 --- a/bacula/src/filed/xattr.c +++ b/bacula/src/filed/xattr.c @@ -538,10 +538,10 @@ static bxattr_exit_code linux_xattr_build_streams(JCR *jcr, FF_PKT *ff_pkt) } bail_out: - if (xattr_list) { + if (xattr_list != NULL) { free(xattr_list); } - if (xattr_value_list) { + if (xattr_value_list != NULL) { xattr_drop_internal_table(xattr_value_list); } return retval; @@ -901,13 +901,13 @@ static bxattr_exit_code bsd_build_xattr_streams(JCR *jcr, FF_PKT *ff_pkt) } bail_out: - if (current_attrnamespace) { + if (current_attrnamespace != NULL) { free(current_attrnamespace); } - if (xattr_list) { + if (xattr_list != NULL) { free(xattr_list); } - if (xattr_value_list) { + if (xattr_value_list != NULL) { xattr_drop_internal_table(xattr_value_list); xattr_value_list = NULL; } @@ -1636,7 +1636,7 @@ static bxattr_exit_code solaris_save_xattr(JCR *jcr, int fd, const char *xattr_n } bail_out: - if (acl_text) { + if (acl_text != NULL) { free(acl_text); } if (attrfd != -1) { -- 2.39.5