mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
- fix includes to work in both samba4 and ctdb standalone
- when we do a store_unlock the lock record becomes unlocked, so we must destroy it (or we leak memory) (This used to be ctdb commit d85955640e670dd580073da96b25fb8a10c08d18)
This commit is contained in:
parent
5f592876d1
commit
34bf25e227
@ -796,10 +796,13 @@ int ctdb_store_unlock(struct ctdb_record_handle *rec, TDB_DATA data)
|
||||
ret = ctdb_ltdb_fetch(rec->ctdb_db, rec->key, &header, NULL, NULL);
|
||||
if (ret) {
|
||||
ctdb_set_error(rec->ctdb_db->ctdb, "Fetch of locally held record failed");
|
||||
talloc_free(rec);
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = ctdb_ltdb_store(rec->ctdb_db, rec->key, &header, data);
|
||||
|
||||
talloc_free(rec);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -656,6 +656,7 @@ int ctdb_client_store_unlock(struct ctdb_record_handle *rec, TDB_DATA data)
|
||||
state = ctdb_client_store_unlock_send(rec, rec, data);
|
||||
res = ctdb_client_store_unlock_recv(state, rec);
|
||||
|
||||
return res;
|
||||
talloc_free(rec);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "system/network.h"
|
||||
#include "system/filesys.h"
|
||||
#include "../include/ctdb_private.h"
|
||||
#include "ctdb.h"
|
||||
#include "../include/ctdb.h"
|
||||
|
||||
/* structures for packet queueing - see common/ctdb_io.c */
|
||||
struct ctdb_partial {
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "system/network.h"
|
||||
#include "system/filesys.h"
|
||||
#include "../include/ctdb_private.h"
|
||||
|
||||
#include "lib/util/dlinklist.h"
|
||||
|
||||
/*
|
||||
this dispatches the messages to the registered ctdb message handler
|
||||
|
@ -20,9 +20,10 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "lib/events/events.h"
|
||||
#include "lib/tdb/include/tdb.h"
|
||||
#include "system/network.h"
|
||||
#include "system/filesys.h"
|
||||
#include "ctdb_private.h"
|
||||
#include "../include/ctdb_private.h"
|
||||
|
||||
/*
|
||||
return error string for last error
|
||||
|
Loading…
Reference in New Issue
Block a user