From: Marco van Wieringen Date: Mon, 21 Dec 2009 09:05:45 +0000 (+0100) Subject: Try to fix problem on FreeBSD with unsupported extended attributes which gives lots... X-Git-Tag: Release-7.0.0~2448 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8ed7caeffa157f69e84ff69b1aa20bc2dddf36f6;p=bacula%2Fbacula Try to fix problem on FreeBSD with unsupported extended attributes which gives lots of orphaned buffers as seen in regression testing. --- 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) {