]> granicus.if.org Git - libevent/commitdiff
Fix a locking error in bufferevent_socket_get_dns_error.
authorNick Mathewson <nickm@torproject.org>
Tue, 5 Feb 2013 20:07:32 +0000 (15:07 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 5 Feb 2013 20:07:32 +0000 (15:07 -0500)
Patch from Ka-Hing Cheung.

bufferevent_sock.c

index 19e90d5a9d6dc90b913c629e0e4aed3d9d790e9b..9b0caf2499e9b0abea88ca2d746ac4d83d0a9cb1 100644 (file)
@@ -515,7 +515,7 @@ bufferevent_socket_get_dns_error(struct bufferevent *bev)
 
        BEV_LOCK(bev);
        rv = bev_p->dns_error;
-       BEV_LOCK(bev);
+       BEV_UNLOCK(bev);
 
        return rv;
 }