diff options
-rw-r--r-- | URPM.xs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1035,6 +1035,7 @@ parse_line(AV *depslist, HV *provides, HV *obsoletes, URPM__Package pkg, char *b if (obsoletes) update_obsoletes(_pkg, obsoletes); av_push(depslist, sv_pkg); } + // reset package, next line will be for another one memset(pkg, 0, sizeof(struct s_Package)); } else if (!strcmp(tag, "filesize")) pkg->filesize = atoi(data); @@ -2829,6 +2830,7 @@ Urpm_parse_synthesis__XS(urpm, filename, ...) f = Fopen(filename, "r.fdio"); if (!rc && (f = Fdopen(f, t)) != NULL && !Ferror(f)) { + // initialize first package memset(&pkg, 0, sizeof(struct s_Package)); buff[sizeof(buff)-1] = 0; p = buff; |