src/rpm.c
changeset 369 f8c27fe9fe63
parent 310 9a7691262ce6
child 373 fda83d91e600
     1.1 --- a/src/rpm.c	Wed Jul 02 18:46:47 2008 +0100
     1.2 +++ b/src/rpm.c	Fri Jun 12 16:59:11 2009 +0100
     1.3 @@ -1,6 +1,7 @@
     1.4  /*
     1.5   * Copyright (C) 2008  Kristian Høgsberg <krh@redhat.com>
     1.6   * Copyright (C) 2008  Red Hat, Inc
     1.7 + * Copyright (C) 2009  J. Ali Harlow <ali@juiblex.co.uk>
     1.8   *
     1.9   * This program is free software; you can redistribute it and/or modify
    1.10   * it under the terms of the GNU General Public License as published by
    1.11 @@ -602,17 +603,21 @@
    1.12  
    1.13  	if (!option_nodeps && razor_transaction_describe(trans) > 0) {
    1.14  		printf("unsatisfied dependencies.\n");
    1.15 +		razor_transaction_destroy(trans);
    1.16  		exit(1);
    1.17  	}
    1.18  
    1.19 -	if (option_test)
    1.20 +	if (option_test) {
    1.21 +		razor_transaction_destroy(trans);
    1.22  		exit(0);
    1.23 +	}
    1.24  
    1.25 -	next = razor_transaction_finish(trans);
    1.26 +	next = razor_transaction_commit(trans);
    1.27  
    1.28  	if (!option_justdb)
    1.29  		razor_set_diff(set, next, update_package, NULL);
    1.30  
    1.31 +	razor_transaction_destroy(trans);
    1.32  	razor_set_destroy(set);
    1.33  	razor_set_destroy(upstream);
    1.34  
    1.35 @@ -644,17 +649,21 @@
    1.36  
    1.37  	if (!option_nodeps && razor_transaction_describe(trans) > 0) {
    1.38  		printf("unsatisfied dependencies.\n");
    1.39 +		razor_transaction_destroy(trans);
    1.40  		exit(1);
    1.41  	}
    1.42  
    1.43 -	if (option_test)
    1.44 +	if (option_test) {
    1.45 +		razor_transaction_destroy(trans);
    1.46  		exit(0);
    1.47 +	}
    1.48  
    1.49 -	next = razor_transaction_finish(trans);
    1.50 +	next = razor_transaction_commit(trans);
    1.51  
    1.52  	if (!option_justdb)
    1.53  		razor_set_diff(set, next, update_package, NULL);
    1.54  
    1.55 +	razor_transaction_destroy(trans);
    1.56  	razor_set_destroy(set);
    1.57  	razor_set_destroy(upstream);
    1.58  
    1.59 @@ -686,17 +695,21 @@
    1.60  
    1.61  	if (!option_nodeps && razor_transaction_describe(trans) > 0) {
    1.62  		printf("unsatisfied dependencies.\n");
    1.63 +		razor_transaction_destroy(trans);
    1.64  		exit(1);
    1.65  	}
    1.66  
    1.67 -	if (option_test)
    1.68 +	if (option_test) {
    1.69 +		razor_transaction_destroy(trans);
    1.70  		exit(0);
    1.71 +	}
    1.72  
    1.73 -	next = razor_transaction_finish(trans);
    1.74 +	next = razor_transaction_commit(trans);
    1.75  
    1.76  	if (!option_justdb)
    1.77  		razor_set_diff(set, next, update_package, NULL);
    1.78  
    1.79 +	razor_transaction_destroy(trans);
    1.80  	razor_set_destroy(set);
    1.81  	razor_set_destroy(upstream);
    1.82