From 8e09edfcde5ab3f802cae36578e4c5ec69e72fa8 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sun, 12 Jan 2003 18:17:02 +0000 Subject: [PATCH] kadm5_get_either leaks memory * svr_iters.c (kadm5_get_either): For POSIX_REGEXPS (i.e. regcomp), call regfree() to cleanup memory. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15116 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kadm5/srv/ChangeLog | 5 +++++ src/lib/kadm5/srv/svr_iters.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/lib/kadm5/srv/ChangeLog b/src/lib/kadm5/srv/ChangeLog index 61b48f870..6d3e3de5b 100644 --- a/src/lib/kadm5/srv/ChangeLog +++ b/src/lib/kadm5/srv/ChangeLog @@ -1,3 +1,8 @@ +2003-01-12 Ezra Peisach + + * svr_iters.c (kadm5_get_either): For POSIX_REGEXPS + (i.e. regcomp), call regfree() to cleanup memory. + 2003-01-10 Ken Raeburn * Makefile.in: Add AC_SUBST_FILE marker for lib_frag and libobj_frag. diff --git a/src/lib/kadm5/srv/svr_iters.c b/src/lib/kadm5/srv/svr_iters.c index d91f368fd..8c04d7857 100644 --- a/src/lib/kadm5/srv/svr_iters.c +++ b/src/lib/kadm5/srv/svr_iters.c @@ -236,6 +236,9 @@ static kadm5_ret_t kadm5_get_either(int princ, } free(regexp); +#ifdef POSIX_REGEXPS + regfree(&data.preg); +#endif if (ret == OSA_ADB_OK && data.malloc_failed) ret = ENOMEM; if (ret != OSA_ADB_OK) { -- 2.26.2