Don't free struct clsrvconf members rewritein and rewriteout.
authorLinus Nordberg <linus@nordberg.se>
Mon, 26 Aug 2013 13:32:13 +0000 (15:32 +0200)
committerLinus Nordberg <linus@nordberg.se>
Mon, 2 Sep 2013 11:54:34 +0000 (13:54 +0200)
They are pointers into static struct hash *rewriteconfs and should
live forever.

Patch by Fabian Mauchle.

ChangeLog
radsecproxy.c

index 8a164a7..d43d5b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,8 @@
        Bug fixes:
        - The duplication cache is purged properly. Patch by Fabian
        Mauchle.
+       - Stop freeing a shared piece of memory manifesting itself as a
+       crash when using dynamic discovery. Patch by Fabian Mauchle.
 
 2012-10-25 1.6.2
        Bug fixes (security):
index 3e4f360..d531395 100644 (file)
@@ -2646,8 +2646,8 @@ void freeclsrvconf(struct clsrvconf *conf) {
        free(conf->rewriteusername);
     }
     free(conf->dynamiclookupcommand);
-    free(conf->rewritein);
-    free(conf->rewriteout);
+    conf->rewritein=NULL;
+    conf->rewriteout=NULL;
     if (conf->hostports)
        freehostports(conf->hostports);
     if (conf->lock) {