aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/qemu-char.c b/qemu-char.c
index d956f8db6c..dd83203fa2 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -51,7 +51,6 @@
#include <netinet/in.h>
#include <net/if.h>
#include <arpa/inet.h>
-#include <dirent.h>
#include <netdb.h>
#include <sys/select.h>
#ifdef CONFIG_BSD
@@ -2711,9 +2710,7 @@ static int tcp_set_msgfds(CharDriverState *chr, int *fds, int num)
TCPCharDriver *s = chr->opaque;
/* clear old pending fd array */
- if (s->write_msgfds) {
- g_free(s->write_msgfds);
- }
+ g_free(s->write_msgfds);
if (num) {
s->write_msgfds = g_malloc(num * sizeof(int));