Commit b4906e05 authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: [CHECKER] Memory leak in jfs_link

parent 5a1564e6
......@@ -792,14 +792,14 @@ static int jfs_link(struct dentry *old_dentry,
goto out;
if ((rc = dtSearch(dir, &dname, &ino, &btstack, JFS_CREATE)))
goto out;
goto free_dname;
/*
* create entry for new link in parent directory
*/
ino = ip->i_ino;
if ((rc = dtInsert(tid, dir, &dname, &ino, &btstack)))
goto out;
goto free_dname;
/* update object inode */
ip->i_nlink++; /* for new link */
......@@ -812,6 +812,9 @@ static int jfs_link(struct dentry *old_dentry,
iplist[1] = dir;
rc = txCommit(tid, 2, &iplist[0], 0);
free_dname:
free_UCSname(&dname);
out:
txEnd(tid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment