1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

Fix double free bugs after calling regfio_close()

(This used to be commit 737bb950d50ac6c5d4f99279bf535ae3a9963b2f)
This commit is contained in:
Tim Potter 2008-02-18 20:37:33 +11:00 committed by Jeremy Allison
parent 441de75e58
commit 34eef81d2a

View File

@ -1171,7 +1171,6 @@ out:
if ( !(rb->mem_ctx = talloc_init( "read_regf_block" )) ) {
regfio_close( rb );
SAFE_FREE(rb);
return NULL;
}
@ -1182,7 +1181,6 @@ 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;
}
@ -1192,7 +1190,6 @@ 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;
}
@ -1205,7 +1202,6 @@ 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;
}