From 7bcb40b37889c2e5c16cb54843125f69163b4eb8 Mon Sep 17 00:00:00 2001 From: szaka Date: Sun, 29 Jun 2008 16:52:27 +0000 Subject: [PATCH] cleanup ntfs_attr_open() --- libntfs-3g/attrib.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libntfs-3g/attrib.c b/libntfs-3g/attrib.c index d298d864..2e13a0f8 100644 --- a/libntfs-3g/attrib.c +++ b/libntfs-3g/attrib.c @@ -389,10 +389,8 @@ ntfs_attr *ntfs_attr_open(ntfs_inode *ni, const ATTR_TYPES type, return NULL; if (name && name != AT_UNNAMED && name != NTFS_INDEX_I30) { name = ntfs_ucsndup(name, name_len); - if (!name) { - free(na); - return NULL; - } + if (!name) + goto err_out; } ctx = ntfs_attr_get_search_ctx(ni, NULL);