aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/daemon_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/daemon_user.c')
-rw-r--r--arch/um/drivers/daemon_user.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c
index 1bb085b2824..c944265955e 100644
--- a/arch/um/drivers/daemon_user.c
+++ b/arch/um/drivers/daemon_user.c
@@ -158,10 +158,16 @@ static void daemon_remove(void *data)
158 struct daemon_data *pri = data; 158 struct daemon_data *pri = data;
159 159
160 os_close_file(pri->fd); 160 os_close_file(pri->fd);
161 pri->fd = -1;
161 os_close_file(pri->control); 162 os_close_file(pri->control);
163 pri->control = -1;
164
162 kfree(pri->data_addr); 165 kfree(pri->data_addr);
166 pri->data_addr = NULL;
163 kfree(pri->ctl_addr); 167 kfree(pri->ctl_addr);
168 pri->ctl_addr = NULL;
164 kfree(pri->local_addr); 169 kfree(pri->local_addr);
170 pri->local_addr = NULL;
165} 171}
166 172
167int daemon_user_write(int fd, void *buf, int len, struct daemon_data *pri) 173int daemon_user_write(int fd, void *buf, int len, struct daemon_data *pri)