From: Alan T. DeKok Date: Tue, 26 Feb 2013 18:24:17 +0000 (-0500) Subject: q is char*, not PAIR_LIST* X-Git-Tag: release_3_0_0_beta1~915 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5283adbfb54a57111de8377bc1334f4ec95cb37d;p=thirdparty%2Ffreeradius-server.git q is char*, not PAIR_LIST* --- diff --git a/src/main/files.c b/src/main/files.c index e707a51a197..675a6777d83 100644 --- a/src/main/files.c +++ b/src/main/files.c @@ -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;