diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-09-15 17:17:51 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-09-15 17:17:51 +0000 |
commit | b82a1ae4cef20f1b50c6a2a78d1635a4c18af8ca (patch) | |
tree | e5abaff30d0d0f4bf71da94653eabcf9a7767edb /nuttx/net/net_clone.c | |
parent | b6b09a6b1af770cbd3ab849fa8b974c3e6f7caae (diff) | |
download | px4-nuttx-b82a1ae4cef20f1b50c6a2a78d1635a4c18af8ca.tar.gz px4-nuttx-b82a1ae4cef20f1b50c6a2a78d1635a4c18af8ca.tar.bz2 px4-nuttx-b82a1ae4cef20f1b50c6a2a78d1635a4c18af8ca.zip |
Fix reference counting errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2056 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/net/net_clone.c')
-rw-r--r-- | nuttx/net/net_clone.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nuttx/net/net_clone.c b/nuttx/net/net_clone.c index ab5e5a952..313daee24 100644 --- a/nuttx/net/net_clone.c +++ b/nuttx/net/net_clone.c @@ -86,6 +86,7 @@ int net_clone(FAR struct socket *psock1, FAR struct socket *psock2) /* Increment the reference count on the connection */ DEBUGASSERT(psock2->s_conn); + psock2->s_crefs = 1; /* One reference on the new socket itself */ #ifdef CONFIG_NET_TCP if (psock2->s_type == SOCK_STREAM) |