Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Do not try to call kevent if not on ssh
Baptiste Daroussin committed 13 years ago
commit d9a542d7717a5a8953d545f46728b902637f8ecd
parent b03f667
1 file changed +3 -2
modified libpkg/fetch.c
@@ -398,8 +398,9 @@ pkg_fetch_file_to_fd(struct pkg_fetch *f, const char *url, int dest, time_t *t)

	cleanup:

-
	if (strcmp(u->scheme, "ssh") != 0 && remote != NULL) {
-
		fclose(remote);
+
	if (strcmp(u->scheme, "ssh") != 0) {
+
		if (remote != NULL)
+
			fclose(remote);
	} else {
		EV_SET(&e, fileno(f->ssh), EVFILT_READ, EV_DELETE, 0, 0, 0);
		kevent(kq, &e, 1, NULL, 0, NULL);