Ticket #10384: 0001-Fix-Coverity-CID-992448-Resource-leak.patch

File 0001-Fix-Coverity-CID-992448-Resource-leak.patch, 812 bytes (added by noryb009, 6 years ago)
  • src/add-ons/kernel/file_systems/nfs4/InodeDir.cpp

    From 0642015aba73075a4080ab738ff1ff63995ecb64 Mon Sep 17 00:00:00 2001
    From: noryb009 <noryb009@hotmail.com>
    Date: Sun, 5 Jan 2014 21:52:27 -0500
    Subject: [PATCH] Fix Coverity CID 992448: Resource leak
    
    ---
     src/add-ons/kernel/file_systems/nfs4/InodeDir.cpp | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/src/add-ons/kernel/file_systems/nfs4/InodeDir.cpp b/src/add-ons/kernel/file_systems/nfs4/InodeDir.cpp
    index 4d78e09..aae1fa0 100644
    a b Inode::GetDirSnapshot(DirectoryCacheSnapshot** _snapshot,  
    243243            &dirCookie, &dirCookieVerf, attribute);
    244244        if (result != B_OK) {
    245245            delete snapshot;
     246            if (dirents != NULL)
     247                delete [] dirents;
    246248            return result;
    247249        }
    248250