fixed a memory leak with md5 sums handling
This commit is contained in:
parent
de5e40bcd8
commit
df5c0392fa
1 changed files with 3 additions and 1 deletions
|
@ -164,8 +164,10 @@ int remove_commit(pmtrans_t *trans, pmdb_t *db)
|
||||||
for(lp = pm_list_last(info->files); lp; lp = lp->prev) {
|
for(lp = pm_list_last(info->files); lp; lp = lp->prev) {
|
||||||
int nb = 0;
|
int nb = 0;
|
||||||
char *file = lp->data;
|
char *file = lp->data;
|
||||||
if(_alpm_needbackup(lp->data, info->backup)) {
|
char *md5 =_alpm_needbackup(lp->data, info->backup);
|
||||||
|
if(md5) {
|
||||||
nb = 1;
|
nb = 1;
|
||||||
|
free(md5);
|
||||||
}
|
}
|
||||||
if(!nb && trans->type == PM_TRANS_TYPE_UPGRADE) {
|
if(!nb && trans->type == PM_TRANS_TYPE_UPGRADE) {
|
||||||
/* check noupgrade */
|
/* check noupgrade */
|
||||||
|
|
Loading…
Add table
Reference in a new issue