[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Thu Mar 29 07:51:03 MDT 2012
The branch, master has been updated
via ed43a5a s3: Fix a valgrind error
from 593e731 lib/tdb: Update ABI
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ed43a5a94f79b5d2ecbc7ab700b1fd3f96c48ac7
Author: Volker Lendecke <vl at samba.org>
Date: Thu Mar 29 14:16:04 2012 +0200
s3: Fix a valgrind error
Autobuild-User: Volker Lendecke <vl at samba.org>
Autobuild-Date: Thu Mar 29 15:50:13 CEST 2012 on sn-devel-104
-----------------------------------------------------------------------
Summary of changes:
source3/lib/messages.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 947a274..6a18e4f 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -69,10 +69,17 @@ static void ping_message(struct messaging_context *msg_ctx,
struct server_id src,
DATA_BLOB *data)
{
- const char *msg = data->data ? (const char *)data->data : "none";
+ const char *msg = "none";
+ char *free_me = NULL;
+ if (data->data != NULL) {
+ free_me = talloc_strndup(talloc_tos(), (char *)data->data,
+ data->length);
+ msg = free_me;
+ }
DEBUG(1,("INFO: Received PING message from PID %s [%s]\n",
procid_str_static(&src), msg));
+ TALLOC_FREE(free_me);
messaging_send(msg_ctx, src, MSG_PONG, data);
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list