diff options
author | Allan McRae <allan@archlinux.org> | 2014-12-21 14:55:53 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-12-24 02:19:29 +0100 |
commit | eac09e1d9fd445eb004d1419717c6e458f1fd019 (patch) | |
tree | cd3ec7e9606a228989aef6fd3476aba7427e0568 /src/pacman | |
parent | c0d9d260704ac59691b9c3cec5aa154be868948c (diff) | |
download | pacman-eac09e1d9fd445eb004d1419717c6e458f1fd019.tar.gz pacman-eac09e1d9fd445eb004d1419717c6e458f1fd019.tar.xz |
Fix memory leak in ALPM_EVENT_OPTDEP_REMOVAL callback
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman')
-rw-r--r-- | src/pacman/callback.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pacman/callback.c b/src/pacman/callback.c index 4993382d..d566d738 100644 --- a/src/pacman/callback.c +++ b/src/pacman/callback.c @@ -269,9 +269,11 @@ void cb_event(alpm_event_t *event) case ALPM_EVENT_OPTDEP_REMOVAL: { alpm_event_optdep_removal_t *e = &event->optdep_removal; + char *dep_string = alpm_dep_compute_string(e->optdep); colon_printf(_("%s optionally requires %s\n"), alpm_pkg_get_name(e->pkg), - alpm_dep_compute_string(e->optdep)); + dep_string); + free(dep_string); } break; case ALPM_EVENT_DATABASE_MISSING: |