Showing error 793

User: Jiri Slaby
Error type: Memory Leak
Error type description: There the code omits to free some allocated memory
File location: fs/ntfs/dir.c
Line in file: 287
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:26:27 UTC


Source:

 257                /* The names are not equal, continue the search. */
 258                if (rc)
 259                        continue;
 260                /*
 261                 * Names match with case insensitive comparison, now try the
 262                 * case sensitive comparison, which is required for proper
 263                 * collation.
 264                 */
 265                rc = ntfs_collate_names(uname, uname_len,
 266                                (ntfschar*)&ie->key.file_name.file_name,
 267                                ie->key.file_name.file_name_length, 1,
 268                                CASE_SENSITIVE, vol->upcase, vol->upcase_len);
 269                if (rc == -1)
 270                        break;
 271                if (rc)
 272                        continue;
 273                /*
 274                 * Perfect match, this will never happen as the
 275                 * ntfs_are_names_equal() call will have gotten a match but we
 276                 * still treat it correctly.
 277                 */
 278                goto found_it;
 279        }
 280        /*
 281         * We have finished with this index without success. Check for the
 282         * presence of a child node and if not present return -ENOENT, unless
 283         * we have got a matching name cached in name in which case return the
 284         * mft reference associated with it.
 285         */
 286        if (!(ie->flags & INDEX_ENTRY_NODE)) {
 287                if (name) {
 288                        ntfs_attr_put_search_ctx(ctx);
 289                        unmap_mft_record(dir_ni);
 290                        return name->mref;
 291                }
 292                ntfs_debug("Entry not found.");
 293                err = -ENOENT;
 294                goto err_out;
 295        } /* Child node present, descend into it. */
 296        /* Consistency check: Verify that an index allocation exists. */
 297        if (!NInoIndexAllocPresent(dir_ni)) {
Show full sources