From e9a63e3b35822eefbc5e17b6f9a4aab5e8c03074 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 12 Mar 2006 00:03:00 +0000 Subject: [PATCH] r14226: Fix Coverity bug # 109 --- source/rpc_server/srv_reg_nt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/rpc_server/srv_reg_nt.c b/source/rpc_server/srv_reg_nt.c index 33711d0fac9..5ac6738b991 100644 --- a/source/rpc_server/srv_reg_nt.c +++ b/source/rpc_server/srv_reg_nt.c @@ -835,8 +835,10 @@ static WERROR restore_registry_key ( REGISTRY_KEY *krecord, const char *fname ) /* get the rootkey from the regf file and then load the tree via recursive calls */ - if ( !(rootkey = regfio_rootkey( regfile )) ) + if ( !(rootkey = regfio_rootkey( regfile )) ) { + regfio_close( regfile ); return WERR_REG_FILE_INVALID; + } result = reg_load_tree( regfile, krecord->name, rootkey );