fixed a small memory leak with md5sums handling
This commit is contained in:
parent
c99a4c85c0
commit
251e52cea7
1 changed files with 2 additions and 0 deletions
|
@ -497,6 +497,7 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
if(tar_extract_file(tar, temp)) {
|
if(tar_extract_file(tar, temp)) {
|
||||||
alpm_logaction("could not extract %s: %s", pathname, strerror(errno));
|
alpm_logaction("could not extract %s: %s", pathname, strerror(errno));
|
||||||
errors++;
|
errors++;
|
||||||
|
FREE(md5_local);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
md5_pkg = MDFile(temp);
|
md5_pkg = MDFile(temp);
|
||||||
|
@ -627,6 +628,7 @@ int add_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
/* 32 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */
|
/* 32 for the hash, 1 for the terminating NULL, and 1 for the tab delimiter */
|
||||||
MALLOC(fn, strlen(file)+34);
|
MALLOC(fn, strlen(file)+34);
|
||||||
sprintf(fn, "%s\t%s", file, md5);
|
sprintf(fn, "%s\t%s", file, md5);
|
||||||
|
FREE(md5);
|
||||||
FREE(file);
|
FREE(file);
|
||||||
lp->data = fn;
|
lp->data = fn;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue