~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_gethwaddr.cc

  • Committer: Monty Taylor
  • Date: 2008-12-06 07:22:02 UTC
  • mto: (656.1.7 devel) (660.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: monty@inaugust.com-20081206072202-2g25o9doqr1l8euu
OOOh doggie. Got rid of my_alloca.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 
52
52
  if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1)
53
53
    goto err;
54
 
  if (!(buf = alloca(len)))
 
54
  if (!(buf = malloc(len)))
55
55
    goto err;
56
56
  if (sysctl(mib, 6, buf, &len, NULL, 0) < 0)
57
57
    goto err;
70
70
  }
71
71
 
72
72
err:
 
73
  if (buf != NULL)
 
74
    free(buf);
73
75
  return res;
74
76
}
75
77