[PATCH] Fix leaks in ISOFS.

From: Dave Jones
Date: Wed Sep 01 2004 - 11:53:18 EST


Spotted with the source checker from Coverity.com.

Signed-off-by: Dave Jones <davej@xxxxxxxxxx>


diff -urpN --exclude-from=/home/davej/.exclude bk-linus/fs/isofs/rock.c linux-2.6/fs/isofs/rock.c
--- bk-linus/fs/isofs/rock.c 2004-07-01 17:44:12.000000000 +0100
+++ linux-2.6/fs/isofs/rock.c 2004-08-23 14:08:20.000000000 +0100
@@ -153,6 +153,7 @@ int get_rock_ridge_filename(struct iso_d
}
}
MAYBE_CONTINUE(repeat,inode);
+ if (buffer) kfree(buffer);
return retnamlen; /* If 0, this file did not have a NM field */
out:
if(buffer) kfree(buffer);
@@ -351,7 +352,6 @@ int parse_rock_ridge_inode_internal(stru
}
}
MAYBE_CONTINUE(repeat,inode);
- return 0;
out:
if(buffer) kfree(buffer);
return 0;
@@ -515,6 +515,8 @@ static int rock_ridge_symlink_readpage(s
}
}
MAYBE_CONTINUE(repeat, inode);
+ if (buffer)
+ kfree(buffer);

if (rpnt == link)
goto fail;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/