From: Ronnie Sahlberg Date: Sat, 5 May 2007 21:07:47 +0000 (+1000) Subject: hte timed_out variable needs to be static and can not be on the stack X-Git-Tag: tevent-0.9.20~348^2~2768^2~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4f2cdc2d8b7cf27f95d71b4fa0df6319d6a0b60d;p=thirdparty%2Fsamba.git hte timed_out variable needs to be static and can not be on the stack since if the command times out and we return from ctdb_control we may have events that can trigger later which will overwrite data that is no longer in our stackframe (This used to be ctdb commit 93942543092be618c0bd8ef68b470b0789bad7ad) --- diff --git a/ctdb/common/ctdb_client.c b/ctdb/common/ctdb_client.c index de6d4f7b69e..2c0f3bb3733 100644 --- a/ctdb/common/ctdb_client.c +++ b/ctdb/common/ctdb_client.c @@ -678,7 +678,7 @@ int ctdb_control(struct ctdb_context *ctdb, uint32_t destnode, uint64_t srvid, struct ctdb_req_control *c; size_t len; int ret; - uint32_t timed_out; + static uint32_t timed_out; /* if the domain socket is not yet open, open it */ if (ctdb->daemon.sd==-1) {