xbps_purge_pkg: fix a memleak.
This commit is contained in:
parent
1698bde3a4
commit
2bc9890eb6
@ -174,8 +174,8 @@ xbps_purge_pkg(const char *pkgname, bool check_state)
|
|||||||
} else {
|
} else {
|
||||||
if (prop_dictionary_get(dict, "conf_files")) {
|
if (prop_dictionary_get(dict, "conf_files")) {
|
||||||
rv = xbps_remove_pkg_files(dict, "conf_files", pkgver);
|
rv = xbps_remove_pkg_files(dict, "conf_files", pkgver);
|
||||||
prop_object_release(dict);
|
|
||||||
if (rv != 0) {
|
if (rv != 0) {
|
||||||
|
prop_object_release(dict);
|
||||||
xbps_set_cb_state(XBPS_STATE_PURGE_FAIL,
|
xbps_set_cb_state(XBPS_STATE_PURGE_FAIL,
|
||||||
rv, pkgname, version,
|
rv, pkgname, version,
|
||||||
"%s: [purge] failed to remove "
|
"%s: [purge] failed to remove "
|
||||||
@ -184,6 +184,7 @@ xbps_purge_pkg(const char *pkgname, bool check_state)
|
|||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
prop_object_release(dict);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Execute the purge action in REMOVE script (if found).
|
* Execute the purge action in REMOVE script (if found).
|
||||||
|
Loading…
Reference in New Issue
Block a user