summaryrefslogtreecommitdiffstats
path: root/source/registry/regfio.c
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
commitd28a537277bedb65d1c2a01c971a3a22b1aa6624 (patch)
tree9132076a6cb928e49b66a2f388daf64197cfb9e3 /source/registry/regfio.c
parente78f6872bfc19ce0476b8d79c856a8d9c646a913 (diff)
downloadsamba-d28a537277bedb65d1c2a01c971a3a22b1aa6624.tar.gz
samba-d28a537277bedb65d1c2a01c971a3a22b1aa6624.tar.xz
samba-d28a537277bedb65d1c2a01c971a3a22b1aa6624.zip
Fix Coverity IDs 451, 452
Diffstat (limited to 'source/registry/regfio.c')
-rw-r--r--source/registry/regfio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/registry/regfio.c b/source/registry/regfio.c
index 92077aa8478..3740ff0ee4a 100644
--- a/source/registry/regfio.c
+++ b/source/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;