Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Properly initialize phtread mutexes in pkg repo.
Keve committed 1 year ago
commit f600043d5d9806596ab13884e11572179747b775
parent b42190e
1 file changed +6 -0
modified libpkg/pkg_repo_create.c
@@ -823,6 +823,12 @@ pkg_repo_create(struct pkg_repo_create *prc, char *path)

	te.meta = prc->meta;

+
	/* initialize mutexes & conditions */
+
	pthread_mutex_init(&te.nlock, 0);
+
	pthread_mutex_init(&te.llock, 0);
+
	pthread_mutex_init(&te.flock, 0);
+
	pthread_cond_init(&te.cond, 0);
+

	repopath[0] = path;
	repopath[1] = NULL;