diff --git a/src/rpmfunctions.c b/src/rpmfunctions.c index d249874..99675ae 100644 --- a/src/rpmfunctions.c +++ b/src/rpmfunctions.c @@ -69,8 +69,10 @@ unsigned int checkVersionWithFlags(const char* cmp1, uint_32 flags, const char* struct EVR_s evr1, evr2; int vercmp = 0; + sem_wait(&rpm_mutex); rpmEVRparse(cmp1, &evr1); rpmEVRparse(cmp2, &evr2); + sem_post(&rpm_mutex); if (strlen(evr1.F[RPMEVR_E]) && strlen(evr2.F[RPMEVR_E])) vercmp=rpmvercmp(evr1.F[RPMEVR_E], evr2.F[RPMEVR_E]); else if (strlen(evr2.F[RPMEVR_E])) vercmp = -1;