Signed-off-by: Andrew Gregory <[email protected]>
---
 lib/libalpm/deps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/libalpm/deps.c b/lib/libalpm/deps.c
index 4eb779f..1f6ad11 100644
--- a/lib/libalpm/deps.c
+++ b/lib/libalpm/deps.c
@@ -833,8 +833,9 @@ int _alpm_resolvedeps(alpm_handle_t *handle, alpm_list_t 
*localpkgs,
                        }
                        ret = -1;
                }
+               alpm_list_free(targ);
+               targ = NULL;
        }
-       alpm_list_free(targ);
        alpm_list_free(deps);
 
        if(ret != 0) {
-- 
1.8.5.2


Reply via email to