From f8933f85544ed7fe0bce216ff67b2b8f1b37d1ee Mon Sep 17 00:00:00 2001
From: Aurelien Foret <aurelien@archlinux.org>
Date: Sun, 29 Jan 2006 16:52:41 +0000
Subject: added a missing trans_release before pacman_sync call

---
 src/pacman/deptest.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/pacman/deptest.c b/src/pacman/deptest.c
index fd2663e4..1ed11aa0 100644
--- a/src/pacman/deptest.c
+++ b/src/pacman/deptest.c
@@ -135,10 +135,17 @@ int pacman_deptest(list_t *targets)
 		/* attempt to resolve missing dependencies */
 		/* TODO: handle version comparators (eg, glibc>=2.2.5) */
 		if(retval == 126 && synctargs != NULL) {
+			if(alpm_trans_release() == -1) {
+				ERR(NL, "could not release transaction (%s)", alpm_strerror(pm_errno));
+				FREELIST(synctargs);
+				return(1);
+			}
 			if(!config->op_d_resolve || pacman_sync(synctargs) != 0) {
 				/* error (or -D not used) */
 				retval = 127;
 			}
+			FREELIST(synctargs);
+			return(retval);
 		}
 
 		FREELIST(synctargs);
-- 
cgit v1.2.3-70-g09d2