summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-01-29 17:52:27 +0000
committerJason Woodward2005-01-29 17:52:27 +0000
commit865158063d54ce58da2e4591b54db94e5d1ca379 (patch)
treef8e524be9474ca03a80514d469372e1359fc050b /src
parent3ea2300cdd53461b2e78c2d077a9a1e3f7be33fc (diff)
downloadslapt-get-865158063d54ce58da2e4591b54db94e5d1ca379.tar.gz
added some curl cleanups when handling errors
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index a1260e6..3ce64da 100644
--- a/src/main.c
+++ b/src/main.c
@@ -136,6 +136,7 @@ int main( int argc, char *argv[] ){
case HELP_OPT: /* help */
usage();
free_rc_config(global_config);
+ curl_global_cleanup();
exit(1);
case IGNORE_DEP_OPT: /* ignore-dep */
global_config->ignore_dep = TRUE;
@@ -155,6 +156,7 @@ int main( int argc, char *argv[] ){
global_config = read_rc_config(optarg);
if( global_config == NULL ){
free_rc_config(tmp_gc);
+ curl_global_cleanup();
exit(1);
}
/* preserve existing command line options */
@@ -181,6 +183,7 @@ int main( int argc, char *argv[] ){
default:
usage();
free_rc_config(global_config);
+ curl_global_cleanup();
exit(1);
}
}
@@ -203,6 +206,7 @@ int main( int argc, char *argv[] ){
if( do_action == USAGE ){
usage();
free_rc_config(global_config);
+ curl_global_cleanup();
exit(1);
}
@@ -214,6 +218,7 @@ int main( int argc, char *argv[] ){
case UPDATE:
if( update_pkg_cache(global_config) == 1 ){
free_rc_config(global_config);
+ curl_global_cleanup();
exit(1);
}
break;