fixed potential memory leaks
This commit is contained in:
parent
62d9957739
commit
a9540e2c76
1 changed files with 3 additions and 0 deletions
|
@ -260,14 +260,17 @@ pmpkg_t *pkg_load(char *pkgfile)
|
||||||
tar_extract_file(tar, descfile);
|
tar_extract_file(tar, descfile);
|
||||||
/* parse the info file */
|
/* parse the info file */
|
||||||
if(parse_descfile(descfile, info, 0) == -1) {
|
if(parse_descfile(descfile, info, 0) == -1) {
|
||||||
|
FREE(descfile);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if(!strlen(info->name)) {
|
if(!strlen(info->name)) {
|
||||||
_alpm_log(PM_LOG_ERROR, "missing package name in %s", pkgfile);
|
_alpm_log(PM_LOG_ERROR, "missing package name in %s", pkgfile);
|
||||||
|
FREE(descfile);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if(!strlen(info->version)) {
|
if(!strlen(info->version)) {
|
||||||
_alpm_log(PM_LOG_ERROR, "missing package version in %s", pkgfile);
|
_alpm_log(PM_LOG_ERROR, "missing package version in %s", pkgfile);
|
||||||
|
FREE(descfile);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
config = 1;
|
config = 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue