The Samba-Bugzilla – Attachment 12790 Details for
Bug 12495
source3/locking/leases_db.c -> leases_db_del() crashes smbd when the record does not exist in tdb
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-s3-locking-leases_db_del-should-not-crash-when-there.patch.txt (text/plain), 1.08 KB, created by
YOUZHONG YANG
on 2017-01-03 15:40:43 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
YOUZHONG YANG
Created:
2017-01-03 15:40:43 UTC
Size:
1.08 KB
patch
obsolete
>From cd875c9b2c15ee55e3734ae5578bc617450f1fbd Mon Sep 17 00:00:00 2001 >From: Youzhong Yang <yyang@mathworks.com> >Date: Tue, 3 Jan 2017 10:28:11 -0500 >Subject: [PATCH] s3:locking: leases_db_del() should not crash when there's no record > >Signed-off-by: Youzhong Yang <youzhong@gmail.com> > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12495 >--- > source3/locking/leases_db.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/source3/locking/leases_db.c b/source3/locking/leases_db.c >index 4167ef7..b45d61b 100644 >--- a/source3/locking/leases_db.c >+++ b/source3/locking/leases_db.c >@@ -242,12 +242,12 @@ NTSTATUS leases_db_del(const struct GUID *client_guid, > rec = dbwrap_fetch_locked(leases_db, talloc_tos(), db_key); > TALLOC_FREE(db_key.dptr); > if (rec == NULL) { >- return NT_STATUS_NOT_FOUND; >+ return NT_STATUS_INTERNAL_ERROR; > } > db_value = dbwrap_record_get_value(rec); > if (db_value.dsize == 0) { >- status = NT_STATUS_INTERNAL_ERROR; >- goto out; >+ TALLOC_FREE(rec); >+ return NT_STATUS_NOT_FOUND; > } > > value = talloc(rec, struct leases_db_value); >-- >1.7.2.5 >
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 12495
: 12790