Page MenuHomeFreeBSD

D8152.id21187.diff
No OneTemporary

D8152.id21187.diff

Index: sys/kern/uipc_syscalls.c
===================================================================
--- sys/kern/uipc_syscalls.c
+++ sys/kern/uipc_syscalls.c
@@ -762,8 +762,11 @@
cap_rights_set(&rights, CAP_CONNECT);
}
error = getsock_cap(td, s, &rights, &fp, NULL, NULL);
- if (error != 0)
+ if (error != 0) {
+ if (control != NULL)
+ m_freem(control);
return (error);
+ }
so = (struct socket *)fp->f_data;
#ifdef KTRACE
@@ -816,6 +819,9 @@
}
if (error == 0)
td->td_retval[0] = len - auio.uio_resid;
+
+ /* sosend will consume control */
+ control = NULL;
#ifdef KTRACE
if (ktruio != NULL) {
ktruio->uio_resid = td->td_retval[0];
@@ -823,6 +829,8 @@
}
#endif
bad:
+ if (control != NULL)
+ m_freem(control);
fdrop(fp, td);
return (error);
}

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 6, 1:07 PM (8 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17404128
Default Alt Text
D8152.id21187.diff (783 B)

Event Timeline