]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix memory leak in db2 policy DB initialization
authorGreg Hudson <ghudson@mit.edu>
Fri, 24 Jun 2016 16:33:05 +0000 (12:33 -0400)
committerTom Yu <tlyu@mit.edu>
Fri, 2 Sep 2016 18:49:36 +0000 (14:49 -0400)
commitf7d6382a135d76de1857d1db485354cbbb967d16
treecd661b40370110996e91c81fe3b274046c32ccb4
parent22a7aeab244cb5a2f262f45648ad504aa30a7d3f
Fix memory leak in db2 policy DB initialization

osa_adb_init_db() maintains a static linked list mapping filenames to
lock structures.  Entries are never removed from the list; when their
reference counts hit 0, the lockfile is closed but the filename
remains allocated.  However, the filename is allocated each time the
lockfile is re-opened, leaking the old value.  Fix this leak by moving
filename initialization to entry creation.

(cherry picked from commit f53160634dd5de41c12701ade9e59d4b4dcd645b)

ticket: 8432
version_fixed: 1.14.4
src/plugins/kdb/db2/adb_openclose.c