* [Qemu-Devel][PATCH]:Converted usage of malloc, free, strdup to qemu_malloc, qemu_free, qemu_strdup in qemu-sockets.c
@ 2009-05-07 8:54 vibi
0 siblings, 0 replies; only message in thread
From: vibi @ 2009-05-07 8:54 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Converted usage of malloc,free,strdup to qemu_malloc,qemu_free,qemu_strdup
Signed-off-by: vibi <vibi_sreenivasan@cms.com>
---
qemu-sockets.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/qemu-sockets.c b/qemu-sockets.c
index 4111f82..2f6ab67 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -329,10 +329,10 @@ 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);
+ path = qemu_strdup(str);
memset(&un, 0, sizeof(un));
un.sun_family = AF_UNIX;
@@ -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;
}
--
1.6.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-07 8:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-07 8:54 [Qemu-Devel][PATCH]:Converted usage of malloc, free, strdup to qemu_malloc, qemu_free, qemu_strdup in qemu-sockets.c vibi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).