bug-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnu-radius] Gnu radius will not run on a fresh install of fedor


From: Sergey Poznyakoff
Subject: Re: [Bug-gnu-radius] Gnu radius will not run on a fresh install of fedora 10
Date: Fri, 12 Dec 2008 21:08:12 +0200

Jerry <address@hidden> ha escrit:

> I've tried it on fedora 7 without a problem, but there's something with
> gnu radius that I cannot get it to run at all even though it compiles. 

Please try the attached patch.

Regards,
Sergey

diff --git a/lib/numtostr.c b/lib/numtostr.c
index 97ce981..a319c78 100644
--- a/lib/numtostr.c
+++ b/lib/numtostr.c
@@ -32,8 +32,6 @@ numtostr (inttype i, char *buf, size_t size)
        char *p = ibuf + sizeof ibuf;
        size_t s;
        
-       *p = 0;
-
        if (i < 0) {
                do
                        *--p = '0' - i % 10;
diff --git a/radiusd/rewrite.y b/radiusd/rewrite.y
index e77dc98..34f0926 100644
--- a/radiusd/rewrite.y
+++ b/radiusd/rewrite.y
@@ -661,6 +661,7 @@ static int rw_error_free(char *msg);
 #define rw_code_unlock()
 
 #define AVPLIST(m) ((m)->req ? (m)->req->avlist : NULL)
+
 %}
 
 
@@ -729,18 +730,15 @@ input   : dcllist
          }
         | expr
           {
-                 FUNCTION fmain;
-
                   if (errcnt) {
                           YYERROR;
                   }
                  
                  mtx_return($1);
-                  
-                 memset(&fmain, 0, sizeof(fmain));
-                 fmain.name = "main";
-                 fmain.rettype = return_type = $1->gen.datatype;
-                 function = &fmain;
+
+                 function = grad_emalloc(sizeof(*function));
+                 function->name = "main";
+                 function->rettype = return_type = $1->gen.datatype;
 
                   if (optimize() == 0) {
                           codegen();
@@ -2071,6 +2069,7 @@ _list_insert(RWLIST **first, RWLIST **last, RWLIST *prev, 
RWLIST *obj,
 RWLIST *
 _list_remove(RWLIST **first, RWLIST **last, RWLIST *obj)
 {
+       RWLIST *p = obj;
         RWLIST *temp;
 
         if (temp = obj->prev) 
@@ -2080,10 +2079,10 @@ _list_remove(RWLIST **first, RWLIST **last, RWLIST *obj)
 
         if (temp = obj->next)
                 temp->prev = obj->prev;
-        else if (last)
+        else 
                 *last = obj->prev;
 
-        obj->prev = obj->next = NULL;
+        p->prev = p->next = NULL;
         
         return obj;
 }
@@ -5959,6 +5958,7 @@ rewrite_compile(char *expr)
                }
                function->name = name;
                function_install(function);
+               grad_free(function);
        }
        return name;
 }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]