From 5cee54b58cbee2b2c87a6c2803f316397c30ef16 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Sat, 15 Aug 2009 10:41:18 +0200 Subject: [PATCH] No need to flush the members of the xattr link cache as they are not dynamically created. Small oversight from my side, was thinking I had a memory leak. --- bacula/src/filed/xattr.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/bacula/src/filed/xattr.c b/bacula/src/filed/xattr.c index bd8e3db172..b814183ae4 100644 --- a/bacula/src/filed/xattr.c +++ b/bacula/src/filed/xattr.c @@ -674,17 +674,6 @@ static void add_xattr_link_cache_entry(JCR *jcr, ino_t inum, char *target) jcr->xattr_data->link_cache->append(ptr); } -static void flush_xattr_link_cache(JCR *jcr) -{ - xattr_link_cache_entry_t *ptr; - - foreach_alist(ptr, jcr->xattr_data->link_cache) { - if (ptr && ptr->target) { - free(ptr->target); - } - } -} - #if defined(HAVE_SYS_NVPAIR_H) && defined(_PC_SATTR_ENABLED) /* * This function returns true if a non default extended system attribute @@ -1800,7 +1789,6 @@ static bxattr_exit_code solaris_build_xattr_streams(JCR *jcr, FF_PKT *ff_pkt) getcwd(cwd, sizeof(cwd)); retval = solaris_save_xattrs(jcr, NULL, NULL); chdir(cwd); - flush_xattr_link_cache(jcr); delete jcr->xattr_data->link_cache; jcr->xattr_data->link_cache = NULL; } -- 2.39.5