From f03c4a039334e47e701ab5757a3621a17cf48499 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Wed, 26 Jun 2013 05:42:15 -0700 Subject: [PATCH] client: tweaks to code for detecting GPUs via a child process. --- client/gpu_detect.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/gpu_detect.cpp b/client/gpu_detect.cpp index c36ed897ff..5a9d2cc936 100644 --- a/client/gpu_detect.cpp +++ b/client/gpu_detect.cpp @@ -329,8 +329,11 @@ int COPROCS::read_coproc_info_file(vector &warnings) { if (!f) return ERR_FOPEN; XML_PARSER xp(&mf); mf.init_file(f); - if (!xp.parse_start("coprocs")) return ERR_XML_PARSE; - + if (!xp.parse_start("coprocs")) { + fclose(f); + return ERR_XML_PARSE; + } + while (!xp.get_tag()) { if (xp.match_tag("/coprocs")) { fclose(f);