]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
q is char*, not PAIR_LIST*
authorAlan T. DeKok <aland@freeradius.org>
Tue, 26 Feb 2013 18:24:17 +0000 (13:24 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 26 Feb 2013 19:58:26 +0000 (14:58 -0500)
src/main/files.c

index e707a51a19751dd38ff722214bfb8fd45e83a189..675a6777d8373ac131b4d13474da89a559ac45f0 100644 (file)
@@ -243,9 +243,7 @@ parse_again:
                                /*
                                 *      Done with this entry...
                                 */
-                               q = rad_malloc(sizeof(*t) + entry_len);
-                               t = (PAIR_LIST *) q;
-
+                               t = rad_malloc(sizeof(*t) + entry_len);
                                memset(t, 0, sizeof(*t));
                                t->check = check_tmp;
                                t->reply = reply_tmp;
@@ -253,7 +251,7 @@ parse_again:
                                check_tmp = NULL;
                                reply_tmp = NULL;
 
-                               q += sizeof(*t);
+                               q = (void *) &t[1];
                                memcpy(q, entry, entry_len);
                                t->name = q;