summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-27 11:06:02 +0200
committerVolker Lendecke <vl@samba.org>2011-03-27 11:25:34 +0200
commitf762886687492e3b2dfeefb22fcd82bd6c662baf (patch)
tree09016cbeb1d3f86e1b2d5cc48264992865a069cb
parent4cdaac02dc827879de35235ed6e69c386d584e8e (diff)
downloadsamba-f762886687492e3b2dfeefb22fcd82bd6c662baf.tar.gz
samba-f762886687492e3b2dfeefb22fcd82bd6c662baf.tar.bz2
samba-f762886687492e3b2dfeefb22fcd82bd6c662baf.zip
s3: Fix Coverity ID 2328: FORWARD_NULL
Make startsmbfilepwent robust against an invalid open type
-rw-r--r--source3/passdb/pdb_smbpasswd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 8d6ac318cb..005c23d34e 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -225,6 +225,9 @@ creating file %s\n", pfile));
lock_type = F_WRLCK;
break;
}
+ default:
+ DEBUG(10, ("Invalid open mode: %d\n", type));
+ return NULL;
}
for(race_loop = 0; race_loop < 5; race_loop++) {