Skip to content

Commit

Permalink
q is char*, not PAIR_LIST*
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Feb 26, 2013
1 parent 3764cec commit 5283adb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main/files.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,15 @@ int pairlist_read(const char *file, PAIR_LIST **list, int complain)
/*
* 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;
t->lineno = old_lineno;
check_tmp = NULL;
reply_tmp = NULL;

q += sizeof(*t);
q = (void *) &t[1];
memcpy(q, entry, entry_len);
t->name = q;

Expand Down

0 comments on commit 5283adb

Please sign in to comment.