BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / c4a1ba4bf904af4c5944b30c698180d41df41911 / vfs / inode.c

// Related

Nucleus

Barry Fixed resource leak in VFS c4a1ba4 (3 years, 2 months ago)
diff --git a/vfs/inode.c b/vfs/inode.c
index 8197127..903efd1 100644
--- a/vfs/inode.c
+++ b/vfs/inode.c
@@ -134,8 +134,10 @@ inode_lookup(Inode *inode, const char *name)
 
 	/* The file doesn't exist */
 	if (!child) {
-		if (entry)
+		if (entry) {
 			remove(inode->dirEntries, entry);
+			put(entry);
+		}
 		entry = NULL;
 		goto end;
 	}