Skip to contentSkip to conversation

Use qemu_malloc & qemu_free instead of malloc & free

PATCH New vibisreenivasan 1 participant 1 message May 5, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use qemu_malloc & qemu_free instead of malloc & free

Use qemu_malloc & qemu_free instead of malloc & free

---
 qemu-sockets.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
qemu-sockets.c +0 -0
index 4111f82..f918dc0 100644
@@ -329,7 +329,7 @@ int unix_listen(const char *str, char *ostr, int

olen)

     opts = strchr(str, ',');
     if (opts) {
         len = opts - str;
-        path = malloc(len+1);
+        path = qemu_malloc(len+1);
         snprintf(path, len+1, "%.*s", len, str);
     } else
         path = strdup(str);

@@ -365,11 +365,11 @@ int unix_listen(const char *str, char *ostr, int olen)

     if (sockets_debug)
         fprintf(stderr, "bind(unix:%s): OK\n", un.sun_path);
-    free(path);
+    qemu_free(path);
     return sock;

err:
- free(path);

+    qemu_free(path);
     closesocket(sock);
     return -1;

}

Signature · 1 line
1.6.0