From: vibi <vibi_sreenivasan@cms.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-Devel][PATCH]:Converted usage of malloc, free, strdup to qemu_malloc, qemu_free, qemu_strdup in qemu-sockets.c
Date: Thu, 7 May 2009 14:24:29 +0530 [thread overview]
Message-ID: <200905071424.30249.vibi_sreenivasan@cms.com> (raw)
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
reply other threads:[~2009-05-07 8:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200905071424.30249.vibi_sreenivasan@cms.com \
--to=vibi_sreenivasan@cms.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).