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 e707a51..675a677 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;