[PATCH] dnsapi: Missing lock release on error path (found by Smatch)

Michael Stefaniuc mstefani at redhat.de
Tue May 30 16:39:30 CDT 2006


Hello Hans,

it looks like the function returns on the error path with the lock held.
Is it supposed to do that? If not the attached patch fixes it.

bye
	michael
---

 dlls/dnsapi/query.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

5eebfc820cbf6598d6abd11e681ef091af295f90
diff --git a/dlls/dnsapi/query.c b/dlls/dnsapi/query.c
index f1b31f7..9bdd706 100644
--- a/dlls/dnsapi/query.c
+++ b/dlls/dnsapi/query.c
@@ -628,7 +628,10 @@ #ifdef HAVE_RESOLV
     _res.options |= dns_map_options( options );
 
     if (servers && (ret = dns_set_serverlist( servers )))
+    {
+        UNLOCK_RESOLVER();
         return ret;
+    }
 
     ret = dns_do_query( name, type, options, result );
 
-- 
1.3.3


-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani at redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060530/6faeaae9/attachment.pgp


More information about the wine-patches mailing list