X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fsem_open.c;h=fda0acd35c717992e44b4c5191e6f400d1190532;hb=7b75c4877ddf22f219f944c61d939df1dee4f6d3;hp=ab884a42e00a06ed490a3100eb26562911c80d9d;hpb=56fbaa3bbe73f12af2bfbbcf2adb196e6f9fe264;p=musl diff --git a/src/thread/sem_open.c b/src/thread/sem_open.c index ab884a42..fda0acd3 100644 --- a/src/thread/sem_open.c +++ b/src/thread/sem_open.c @@ -126,6 +126,7 @@ sem_t *sem_open(const char *name, int flags, ...) e = link(tmp, name) ? errno : 0; unlink(tmp); if (!e) break; + munmap(map, sizeof(sem_t)); /* Failure is only fatal when doing an exclusive open; * otherwise, next iteration will try to open the * existing file. */