]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
hte timed_out variable needs to be static and can not be on the stack
authorRonnie Sahlberg <sahlberg@ronnie>
Sat, 5 May 2007 21:07:47 +0000 (07:07 +1000)
committerRonnie Sahlberg <sahlberg@ronnie>
Sat, 5 May 2007 21:07:47 +0000 (07:07 +1000)
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)

ctdb/common/ctdb_client.c

index de6d4f7b69e9c8f2ce82d32bd876faaf58a42a4d..2c0f3bb3733254dbf82c5e5683411a22e1758058 100644 (file)
@@ -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) {