Dolda2000 GitWeb
/
doldaconnect.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5afb0d1
)
Fixed sleeping SEGV.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 16 Mar 2008 05:03:39 +0000
(06:03 +0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 16 Mar 2008 05:03:39 +0000
(06:03 +0100)
daemon/net.c
patch
|
blob
|
blame
|
history
diff --git
a/daemon/net.c
b/daemon/net.c
index
242f10e
..
fa84564
100644
(file)
--- a/
daemon/net.c
+++ b/
daemon/net.c
@@
-365,13
+365,16
@@
static void freesock(struct socket *sk)
void putsock(struct socket *sk)
{
+ struct socket *back;
+
if(--(sk->refcount) < 0) {
flog(LOG_CRIT, "BUG: socket refcount < 0");
abort();
}
if((sk->refcount == 0) && (sk->back->refcount == 0)) {
+ back = sk->back;
freesock(sk);
- freesock(
sk->
back);
+ freesock(back);
}
}