From 6d387037b1969391b71ea56717e21a11ef05323e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 25 Jan 2008 11:13:19 +0100 Subject: Fix Coverity IDs 451, 452 (This used to be commit d28a537277bedb65d1c2a01c971a3a22b1aa6624) --- source3/registry/regfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/registry') 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; -- cgit