diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2006-02-19 16:08:33 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2006-02-19 16:08:33 +0000 |
commit | 07089de55983ef5ee09b061bdd2051ccf2f1ef6e (patch) | |
tree | 557146a6a945b62e2b1e597846067621727909ae | |
parent | c57613916c99167d471437d8ee2d203b379e27f7 (diff) |
Free correct pointer on error path if malloc fails. From Alexey Dobriyan.
-rw-r--r-- | usr.sbin/afs/src/milko/lib/mdb/ndbm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/afs/src/milko/lib/mdb/ndbm.c b/usr.sbin/afs/src/milko/lib/mdb/ndbm.c index 143f0809f1d..ee8a52f3f84 100644 --- a/usr.sbin/afs/src/milko/lib/mdb/ndbm.c +++ b/usr.sbin/afs/src/milko/lib/mdb/ndbm.c @@ -151,7 +151,7 @@ mdb_NDBM_create(MDB **db, const char * filename, int flags, mode_t mode) (*db)->db = NULL; (*db)->name = strdup(filename); if ((*db)->name == NULL) { - free((*db)->name); + free(*db); return ENOMEM; } (*db)->flags = flags; |