summaryrefslogtreecommitdiff
path: root/emulators/qemu/files/patch-tapclose
blob: 1dde3ca9342d878bcebe8bc315f15a9fb9259477 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: qemu/net.c
@@ -788,11 +788,11 @@
 {
     TAPState *s = vc->opaque;
 
-    if (s->down_script[0])
-        launch_script(s->down_script, s->down_script_arg, s->fd);
-
     qemu_set_fd_handler(s->fd, NULL, NULL, NULL);
     close(s->fd);
+
+    if (s->down_script[0])
+        launch_script(s->down_script, s->down_script_arg, -1);
     qemu_free(s);
 }