[2/2] server: Avoid invalid memory access if creation of namespace fails in create_directory (Coverity).

Sebastian Lackner sebastian at fds-team.de
Sun Jan 24 11:50:56 CST 2016


Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---
 server/directory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/directory.c b/server/directory.c
index de049ef..937ab89 100644
--- a/server/directory.c
+++ b/server/directory.c
@@ -192,7 +192,7 @@ static struct directory *create_directory( struct directory *root, const struct
         if (!(dir->entries = create_namespace( hash_size )))
         {
             release_object( dir );
-            dir = NULL;
+            return NULL;
         }
         if (sd) default_set_sd( &dir->obj, sd, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION |
                                 DACL_SECURITY_INFORMATION | SACL_SECURITY_INFORMATION );
-- 
2.6.4



More information about the wine-patches mailing list