Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=7191b1a4a2aa2dd28b5cbd6aaf424aa3daa0e1fe

commit 7191b1a4a2aa2dd28b5cbd6aaf424aa3daa0e1fe
Author: James Buren <[email protected]>
Date:   Sun Aug 19 15:17:49 2012 -0500

fix resource leak in HTTP downloads

diff --git a/lib/libpacman/server.c b/lib/libpacman/server.c
index 54e69b6..96ef4b6 100644
--- a/lib/libpacman/server.c
+++ b/lib/libpacman/server.c
@@ -421,7 +421,7 @@ int _pacman_downloadfiles_forreal(pmlist_t *servers, const 
char *localpath,
pm_errno = PM_ERR_RETRIEVE;
goto error;
}
-
+
} else {
_pacman_log(PM_LOG_DEBUG, _("downloaded %s from %s\n"),
fn, server->server);
@@ -558,6 +558,10 @@ int _pacman_downloadfiles_forreal(pmlist_t *servers, const 
char *localpath,
return(1);
}
}
+                       if(!strcmp(server->protocol, "http") && 
!handle->proxyhost) {
+                               HttpQuit(control);
+                               control = 0;
+                       }
if(remain) {
(*remain)++;
}
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to