diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2010-01-26 04:41:15 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2010-01-26 04:41:15 +0000 |
commit | 06af2946772550af5ad9eea974674de7bde4243b (patch) | |
tree | 6c6c3749a8b863bd3e7a5962fc9189f1a3e34f9c /contrib/sendmail/libsmdb/smdb2.c | |
parent | c1aec8d8e06eaf4b4e5066794fecde82622b6366 (diff) | |
download | FreeBSD-src-06af2946772550af5ad9eea974674de7bde4243b.zip FreeBSD-src-06af2946772550af5ad9eea974674de7bde4243b.tar.gz |
Merge sendmail 8.14.4 to HEAD
MFC after: 4 days
Diffstat (limited to 'contrib/sendmail/libsmdb/smdb2.c')
-rw-r--r-- | contrib/sendmail/libsmdb/smdb2.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/sendmail/libsmdb/smdb2.c b/contrib/sendmail/libsmdb/smdb2.c index be07d63..1580661 100644 --- a/contrib/sendmail/libsmdb/smdb2.c +++ b/contrib/sendmail/libsmdb/smdb2.c @@ -1,5 +1,5 @@ /* -** Copyright (c) 1999-2003 Sendmail, Inc. and its suppliers. +** Copyright (c) 1999-2003, 2009 Sendmail, Inc. and its suppliers. ** All rights reserved. ** ** By using this file, you agree to the terms and conditions set @@ -8,7 +8,7 @@ */ #include <sm/gen.h> -SM_RCSID("@(#)$Id: smdb2.c,v 8.79 2003/06/13 21:33:11 ca Exp $") +SM_RCSID("@(#)$Id: smdb2.c,v 8.80 2009/11/12 23:07:49 ca Exp $") #include <fcntl.h> #include <stdlib.h> @@ -620,12 +620,13 @@ smdb_db_open(database, db_name, mode, mode_mask, sff, type, user_info, db_params } smdb_db = smdb_malloc_database(); - if (smdb_db == NULL) - return SMDBE_MALLOC; - db2 = smdb2_malloc_database(); - if (db2 == NULL) + if (db2 == NULL || smdb_db == NULL) + { + smdb_unlock_file(lock_fd); + smdb_free_database(smdb_db); /* ok to be NULL */ return SMDBE_MALLOC; + } db2->smdb2_lock_fd = lock_fd; |