emulator-ui: Remove dependencies from qemu sources.

This change removes some QEMU-specifics that crept into the UI code.

Change-Id: Ib1974dc64e54a35dc0cd01aec1eb547a9263a0c8
diff --git a/sockets.c b/sockets.c
index 14e9ad6..72a388a 100644
--- a/sockets.c
+++ b/sockets.c
@@ -15,7 +15,6 @@
 #endif
 
 #include "sockets.h"
-#include "qemu-common.h"
 #include <fcntl.h>
 #include <stddef.h>
 #include "qemu_debug.h"
@@ -25,6 +24,7 @@
 #include "android/utils/path.h"
 #include "android/utils/debug.h"
 #include "android/utils/misc.h"
+#include "android/utils/system.h"
 
 #define  D(...) VERBOSE_PRINT(socket,__VA_ARGS__)
 
@@ -786,8 +786,8 @@
     for (count = 0, e = res; e != NULL; e = e->ai_next)
         count += 1;
 
-    list = (SockAddress**) qemu_malloc((count+1)*sizeof(SockAddress*));
-    addr = (SockAddress*)  qemu_malloc(count*sizeof(SockAddress));
+    AARRAY_NEW(list, count+1);
+    AARRAY_NEW(addr, count);
 
     for (nn = 0, e = res; e != NULL; e = e->ai_next) {
 
@@ -816,8 +816,8 @@
         sock_address_done(list[nn]);
         list[nn] = NULL;
     }
-    qemu_free(addr);
-    qemu_free(list);
+    AFREE(addr);
+    AFREE(list);
 }
 
 int