From 60d8f409a269cb1364025e02c1bf44bdddbb8e0c Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Mon, 9 Sep 2002 07:07:44 +0000 Subject: [PATCH] Fix a possible crash in rootfs_free_cookie(). Thanks to Thierry Delhaise (befree) for pointing this one. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1002 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/fs/rootfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/kernel/core/fs/rootfs.c b/src/kernel/core/fs/rootfs.c index 02c14317e0..5c65968023 100755 --- a/src/kernel/core/fs/rootfs.c +++ b/src/kernel/core/fs/rootfs.c @@ -481,6 +481,7 @@ static status_t rootfs_open(fs_cookie _fs, fs_vnode _v, int oflags, file_cookie *_cookie) { // allow to open the file, but it can't be done anything with it + *_cookie = NULL; // help rootfs_free_cookie() to knows if a rootfs_cookie should be free() or not! return B_OK; }