]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
freebsd: fix function usage.
authorEric Leblond <eric@regit.org>
Thu, 6 Sep 2012 20:39:02 +0000 (22:39 +0200)
committerVictor Julien <victor@inliniac.net>
Sat, 8 Sep 2012 19:12:01 +0000 (21:12 +0200)
The unlock function was not correctly used in error treatment.

src/source-ipfw.c

index 36b079aeca1cf242edc8e74e491de1d1cc676ccc..00403fde379f5a62ecb96a017109a89897d3fa3a 100644 (file)
@@ -626,7 +626,7 @@ TmEcode IPFWSetVerdict(ThreadVars *tv, IPFWThreadVars *ptv, Packet *p)
         IPFWMutexLock(nq);
         if (sendto(nq->fd, GET_PKT_DATA(p), GET_PKT_LEN(p), 0,(struct sockaddr *)&nq->ipfw_sin, nq->ipfw_sinlen) == -1) {
             SCLogWarning(SC_WARN_IPFW_XMIT,"Write to ipfw divert socket failed: %s",strerror(errno));
-            IPFWMutexUnlock(&nq->socket_lock);
+            IPFWMutexUnlock(nq);
             SCReturnInt(TM_ECODE_FAILED);
         }