Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148515202
D15358.id42284.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15358.id42284.diff
View Options
Index: sys/netinet/cc/cc_newreno.c
===================================================================
--- sys/netinet/cc/cc_newreno.c
+++ sys/netinet/cc/cc_newreno.c
@@ -82,6 +82,7 @@
#define CAST_PTR_INT(X) (*((int*)(X)))
static int newreno_cb_init(struct cc_var *ccv);
+static void newreno_cb_destroy(struct cc_var *ccv);
static void newreno_ack_received(struct cc_var *ccv, uint16_t type);
static void newreno_after_idle(struct cc_var *ccv);
static void newreno_cong_signal(struct cc_var *ccv, uint32_t type);
@@ -96,6 +97,7 @@
struct cc_algo newreno_cc_algo = {
.name = "newreno",
.cb_init = newreno_cb_init,
+ .cb_destroy = newreno_cb_destroy,
.ack_received = newreno_ack_received,
.after_idle = newreno_after_idle,
.cong_signal = newreno_cong_signal,
@@ -117,11 +119,21 @@
if (nreno != NULL) {
nreno->beta = V_newreno_beta;
nreno->beta_ecn = V_newreno_beta_ecn;
+
+ ccv->cc_data = nreno;
}
return (0);
}
+void
+newreno_cb_destroy(struct cc_var *ccv)
+{
+ if (ccv->cc_data != NULL)
+ free(ccv->cc_data, M_NEWRENO);
+}
+
+
static void
newreno_ack_received(struct cc_var *ccv, uint16_t type)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 19, 9:39 AM (5 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29958836
Default Alt Text
D15358.id42284.diff (1 KB)
Attached To
Mode
D15358: Address memory leak in new reno cc module
Attached
Detach File
Event Timeline
Log In to Comment