diff options
-rw-r--r-- | URPM.xs | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -3910,8 +3910,7 @@ Urpm_stream2header(fp) const char * msg = NULL; rpmRC rc; - pkg = (URPM__Package)malloc(sizeof(struct s_Package)); - memset(pkg, 0, sizeof(struct s_Package)); + pkg = (URPM__Package)calloc(1, sizeof(struct s_Package)); rc = rpmpkgRead(item, fd, &pkg->h, &msg); switch (rc) { @@ -3953,8 +3952,7 @@ Urpm_spec2srcheader(specfile) spec = rpmtsSetSpec(ts, NULL); initSourceHeader(spec, NULL); - pkg = (URPM__Package)malloc(sizeof(struct s_Package)); - memset(pkg, 0, sizeof(struct s_Package)); + pkg = (URPM__Package)calloc(1, sizeof(struct s_Package)); he = (HE_t)memset(alloca(sizeof(*he)), 0, sizeof(*he)); he->tag = RPMTAG_SOURCERPM; |