use calloc

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24116 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-12-11 05:02:22 +00:00
parent 466f1f1cb4
commit 209dbbb1e0

View File

@@ -296,12 +296,9 @@ add_st_object(void)
struct st_object *o, **objs;
int i;
o = malloc(sizeof(*o));
o = calloc(1, sizeof(*o));
if (o == NULL)
return NULL;
memset(o, 0, sizeof(*o));
o->attrs = NULL;
o->num_attributes = 0;
for (i = 0; i < soft_token.object.num_objs; i++) {
if (soft_token.object.objs == NULL) {