From: Ezra Peisach Date: Sun, 12 Jan 2003 18:17:02 +0000 (+0000) Subject: kadm5_get_either leaks memory X-Git-Tag: krb5-1.3-alpha1~161 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8e09edfcde5ab3f802cae36578e4c5ec69e72fa8;p=krb5.git 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 --- 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) {