[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Mon Nov 2 05:05:14 MST 2009
The branch, master has been updated
via f35a1b9... s3-gencache: restore gencache_get behavior with NULL args (with torture test).
from ad6ee94... s3: Make "debug hires timestamp" default to true
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit f35a1b95aa6f50cb1bc919f4ab502ef2c38f6bf5
Author: Günther Deschner <gd at samba.org>
Date: Mon Nov 2 13:01:58 2009 +0100
s3-gencache: restore gencache_get behavior with NULL args (with torture test).
Without this, we panic in wins_srv_is_dead() and fail to start nmbd with
wins support.
Volker, please check.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source3/lib/gencache.c | 12 ++++++++----
source3/torture/torture.c | 5 +++++
2 files changed, 13 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index 6de653f..4889d7c 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -529,11 +529,15 @@ bool gencache_get(const char *keystr, char **value, time_t *ptimeout)
SAFE_FREE(blob.data);
return false;
}
- *value = SMB_STRDUP((char *)blob.data);
- data_blob_free(&blob);
- if (*value == NULL) {
- return false;
+ if (value) {
+ *value = SMB_STRDUP((char *)blob.data);
+ data_blob_free(&blob);
+ if (*value == NULL) {
+ return false;
+ }
+ return true;
}
+ data_blob_free(&blob);
return true;
}
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index ca499a9..bda82f2 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -6431,6 +6431,11 @@ static bool run_local_gencache(int dummy)
return False;
}
+ if (!gencache_get("foo", NULL, NULL)) {
+ d_printf("%s: gencache_get() failed\n", __location__);
+ return False;
+ }
+
if (!gencache_get("foo", &val, &tm)) {
d_printf("%s: gencache_get() failed\n", __location__);
return False;
--
Samba Shared Repository
More information about the samba-cvs
mailing list