[Date Prev][Date Next]
bdb_csn_commit memleak (ITS#2780)
Full_Name: Howard Chu
Version: HEAD, 2.2
Submission from: (NULL) (220.127.116.11)
Submitted by: hyc
This isn't fatal but I thought it should be pointed out. In bdb_add,
bdb_csn_commit is called before bdb_cache_add. When adding the root entry of a
database, the entry is stored on disk, then bdb_csn_commit tries to find the
ctxcsn, which causes a cache search, which loads the root entry into the cache.
But the entry is about to be added to the cache anyway, assuming everything else
succeeds. This results in a leak of one copy of the root entry, and one copy of
the root entryInfo.
It only happens once, but this is really sloppy.