From cf2affffccbec9255ac7c71ea02a4583533b3f01 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 28 Jun 2011 12:17:00 -0600 Subject: [PATCH] remote: fix uninitialized variable Detected by gcc -O2: remote/remote_driver.c: In function 'doRemoteOpen': remote/remote_driver.c:2753:26: error: 'sasl' may be used uninitialized in this function [-Werror=uninitialized] * src/remote/remote_driver.c (remoteAuthSASL): Initialize sasl. --- src/remote/remote_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 2ac87c8de0..0e68bc533a 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -2520,7 +2520,7 @@ remoteAuthSASL (virConnectPtr conn, struct private_data *priv, int ret = -1; const char *mechlist; virNetSASLContextPtr saslCtxt; - virNetSASLSessionPtr sasl; + virNetSASLSessionPtr sasl = NULL; VIR_DEBUG("Client initialize SASL authentication");