The branch, master has been updated
       via  cb14ee57dd0a589242da1ac2830bb7939df460a5 (commit)
      from  17b1e3b2d72c453a0b2f5a783c28f9dd17334620 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit cb14ee57dd0a589242da1ac2830bb7939df460a5
Author: Andrew Tridgell <[EMAIL PROTECTED]>
Date:   Thu May 8 19:59:24 2008 +1000

    fixed realloc bug
    
    Should always use type safe talloc functions when possible. In this case we 
were allocating bytes instead of uint32_t

-----------------------------------------------------------------------

Summary of changes:
 server/ctdb_recoverd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index c3dff32..a40dfbb 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -1409,7 +1409,7 @@ static int do_recovery(struct ctdb_recoverd *rec,
                }
 
                vnnmap->size++;
-               vnnmap->map = talloc_realloc_size(vnnmap, vnnmap->map, 
vnnmap->size);
+               vnnmap->map = talloc_realloc(vnnmap, vnnmap->map, uint32_t, 
vnnmap->size);
                CTDB_NO_MEMORY(ctdb, vnnmap->map);
                vnnmap->map[j++] = nodemap->nodes[i].pnn;
 
@@ -1417,7 +1417,7 @@ static int do_recovery(struct ctdb_recoverd *rec,
        if (vnnmap->size == 0) {
                DEBUG(DEBUG_NOTICE, ("No suitable lmasters found. Adding local 
node (recmaster) anyway.\n"));
                vnnmap->size++;
-               vnnmap->map = talloc_realloc_size(vnnmap, vnnmap->map, 
vnnmap->size);
+               vnnmap->map = talloc_realloc(vnnmap, vnnmap->map, uint32_t, 
vnnmap->size);
                CTDB_NO_MEMORY(ctdb, vnnmap->map);
                vnnmap->map[0] = pnn;
        }       


-- 
CTDB repository

Reply via email to