summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-25 11:13:19 +0100
committerVolker Lendecke <vl@samba.org>2008-01-25 20:55:51 +0100
commit6d387037b1969391b71ea56717e21a11ef05323e (patch)
treeacd672abb8e44a12375826ca032ffb4623ab7e2b /source3/registry
parente2ad28509c4e31fa4d397290b61e376d55e3abb2 (diff)
downloadsamba-6d387037b1969391b71ea56717e21a11ef05323e.tar.gz
samba-6d387037b1969391b71ea56717e21a11ef05323e.tar.bz2
samba-6d387037b1969391b71ea56717e21a11ef05323e.zip
Fix Coverity IDs 451, 452
(This used to be commit d28a537277bedb65d1c2a01c971a3a22b1aa6624)
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/regfio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/registry/regfio.c b/source3/registry/regfio.c
index 92077aa847..3740ff0ee4 100644
--- a/source3/registry/regfio.c
+++ b/source3/registry/regfio.c
@@ -1234,7 +1234,7 @@ static void regfio_mem_free( REGF_FILE *file )
/* cleanup for a file opened for write */
- if ( file->open_flags & (O_WRONLY|O_RDWR) ) {
+ if ((file->fd != -1) && (file->open_flags & (O_WRONLY|O_RDWR))) {
prs_struct ps;
REGF_SK_REC *sk;