summaryrefslogtreecommitdiffstats
path: root/source/registry/regfio.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2007-10-15 07:24:44 +0400
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-15 17:41:09 -0500
commit97f9a90b823887e808cca96eca7a041f121e6111 (patch)
tree8a7a254d4de59e0209736dce3b0329449ee92c98 /source/registry/regfio.c
parent357f00384994946485a5190b6a9c493aeee53cd2 (diff)
downloadsamba-97f9a90b823887e808cca96eca7a041f121e6111.tar.gz
samba-97f9a90b823887e808cca96eca7a041f121e6111.tar.xz
samba-97f9a90b823887e808cca96eca7a041f121e6111.zip
Correctly free memory in regfio paths
Diffstat (limited to 'source/registry/regfio.c')
-rw-r--r--source/registry/regfio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/registry/regfio.c b/source/registry/regfio.c
index 6dca0ba8620..93a27700b3b 100644
--- a/source/registry/regfio.c
+++ b/source/registry/regfio.c
@@ -1171,6 +1171,7 @@ out:
if ( !(rb->mem_ctx = talloc_init( "read_regf_block" )) ) {
regfio_close( rb );
+ SAFE_FREE(rb);
return NULL;
}
@@ -1181,6 +1182,7 @@ out:
if ( (rb->fd = open(filename, flags, mode)) == -1 ) {
DEBUG(0,("regfio_open: failure to open %s (%s)\n", filename, strerror(errno)));
regfio_close( rb );
+ SAFE_FREE(rb);
return NULL;
}
@@ -1190,6 +1192,7 @@ out:
if ( !init_regf_block( rb ) ) {
DEBUG(0,("regfio_open: Failed to read initial REGF block\n"));
regfio_close( rb );
+ SAFE_FREE(rb);
return NULL;
}
@@ -1202,6 +1205,7 @@ out:
if ( !read_regf_block( rb ) ) {
DEBUG(0,("regfio_open: Failed to read initial REGF block\n"));
regfio_close( rb );
+ SAFE_FREE(rb);
return NULL;
}