Fix a couple of code paths on which, if fxp_readdir returned an error,
[sgt/putty] / unix / uxagentc.c
index 3605c60..9f579cd 100644 (file)
@@ -17,7 +17,8 @@
 
 int agent_exists(void)
 {
-    if (getenv("SSH_AUTH_SOCK") != NULL)
+    const char *p = getenv("SSH_AUTH_SOCK");
+    if (p && *p)
        return TRUE;
     return FALSE;
 }