prevent valgrind errors where we print unitialised values on control errors
authorAndrew Tridgell <tridge@samba.org>
Fri, 4 Jul 2008 07:15:06 +0000 (17:15 +1000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 4 Jul 2008 07:15:06 +0000 (17:15 +1000)
client/ctdb_client.c

index f342553d0f5c7a4464b3ab23a5a072932b2cb23a..af4319fc9f6b1ef2bfce259267a1458e7a0edf07 100644 (file)
@@ -884,6 +884,13 @@ int ctdb_control_recv(struct ctdb_context *ctdb,
 {
        TALLOC_CTX *tmp_ctx;
 
+       if (status != NULL) {
+               *status = -1;
+       }
+       if (errormsg != NULL) {
+               *errormsg = NULL;
+       }
+
        if (state == NULL) {
                return -1;
        }