The Samba-Bugzilla – Attachment 16397 Details for
Bug 14614
In tdb_mutex_munmap(), munmap() when addr == 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to check if tdb->mutex is NULL before munmap()
mutex.patch (text/plain), 646 bytes, created by
Albert Chin (temp failure)
on 2021-01-14 09:09:36 UTC
(
hide
)
Description:
Patch to check if tdb->mutex is NULL before munmap()
Filename:
MIME Type:
Creator:
Albert Chin (temp failure)
Created:
2021-01-14 09:09:36 UTC
Size:
646 bytes
patch
obsolete
>Index: lib/tdb/common/mutex.c >=================================================================== >--- lib/tdb/common/mutex.c.orig 2021-01-10 05:04:36.047451383 +0000 >+++ lib/tdb/common/mutex.c 2021-01-13 16:04:41.890303659 +0000 >@@ -644,16 +646,18 @@ > size_t len; > int ret; > >- len = tdb_mutex_size(tdb); >- if (len == 0) { >- return 0; >- } >+ if (tdb->mutexes) { >+ len = tdb_mutex_size(tdb); >+ if (len == 0) { >+ return 0; >+ } > >- ret = munmap(tdb->mutexes, len); >- if (ret == -1) { >- return -1; >+ ret = munmap(tdb->mutexes, len); >+ if (ret == -1) { >+ return -1; >+ } >+ tdb->mutexes = NULL; > } >- tdb->mutexes = NULL; > > return 0; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 14614
: 16397