git.samba.org
/
amitay
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
569c870
)
lib: Fix CID 1128561 Pointer to local outside scope
author
Volker Lendecke
<vl@samba.org>
Wed, 4 Mar 2015 08:43:19 +0000
(09:43 +0100)
committer
David Disseldorp
<ddiss@samba.org>
Wed, 4 Mar 2015 13:46:07 +0000
(14:46 +0100)
This is not strictly a bug, but it is confusing enough to justify a small patch
I guess.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
source3/lib/ctdbd_conn.c
patch
|
blob
|
history
diff --git
a/source3/lib/ctdbd_conn.c
b/source3/lib/ctdbd_conn.c
index 3cedf7e4e2314ff5aa7cfb077e5b3ee7d2ce29b0..204aba566570c02761a6f9766b0b80fa03127972 100644
(file)
--- a/
source3/lib/ctdbd_conn.c
+++ b/
source3/lib/ctdbd_conn.c
@@
-1304,6
+1304,7
@@
char *ctdbd_dbpath(struct ctdbd_connection *conn,
{
NTSTATUS status;
TDB_DATA data;
+ TDB_DATA rdata = {0};
int32_t cstatus = 0;
data.dptr = (uint8_t*)&db_id;
@@
-1311,13
+1312,13
@@
char *ctdbd_dbpath(struct ctdbd_connection *conn,
status = ctdbd_control(conn, CTDB_CURRENT_NODE,
CTDB_CONTROL_GETDBPATH, 0, 0, data,
- mem_ctx, &data, &cstatus);
+ mem_ctx, &
r
data, &cstatus);
if (!NT_STATUS_IS_OK(status) || cstatus != 0) {
DEBUG(0,(__location__ " ctdb_control for getdbpath failed\n"));
return NULL;
}
- return (char *)data.dptr;
+ return (char *)
r
data.dptr;
}
/*