summaryrefslogtreecommitdiff
path: root/source/rpc_server/srv_reg_nt.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/rpc_server/srv_reg_nt.c')
-rw-r--r--source/rpc_server/srv_reg_nt.c4
1 files changed, 3 insertions, 1 deletions
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 );