All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Use qemu_malloc & qemu_free instead of malloc & free
@ 2009-05-05 10:09 vibisreenivasan
  0 siblings, 0 replies; 4+ messages in thread
From: vibisreenivasan @ 2009-05-05 10:09 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

	Use qemu_malloc & qemu_free instead of malloc & free

Signed-off-by: vibi <vibi_sreenivasan@cms.com>
---
 qemu-sockets.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/qemu-sockets.c b/qemu-sockets.c
index 4111f82..f918dc0 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -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;
 }
-- 
1.6.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH]:Use qemu_malloc & qemu_free instead of malloc & free
  2009-05-05 12:50 ` Gerd Hoffmann
@ 2009-05-06  7:21   ` vibisreenivasan
  0 siblings, 0 replies; 4+ messages in thread
From: vibisreenivasan @ 2009-05-06  7:21 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

hi Gred,
	Thanks for pointing that out.
	I will update patch & send it again.
regards
vibi

On Tue, 2009-05-05 at 14:50 +0200, Gerd Hoffmann wrote:
> Hi,
> 
> > -        path = malloc(len+1);
> > +        path = qemu_malloc(len+1);
> >           snprintf(path, len+1, "%.*s", len, str);
> >       } else
> >           path = strdup(str);
> 
> You need s/strdup/qemu_strdup/ here (and maybe elsewhere too), otherwise 
> you'll mix strdup + qemu_free().
> 
> cheers,
>    Gerd
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH]:Use qemu_malloc & qemu_free instead of malloc & free
  2009-05-05 10:31 [Qemu-devel] [PATCH]:Use " vibisreenivasan
@ 2009-05-05 12:50 ` Gerd Hoffmann
  2009-05-06  7:21   ` vibisreenivasan
  0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2009-05-05 12:50 UTC (permalink / raw)
  To: vibi_sreenivasan; +Cc: qemu-devel

   Hi,

> -        path = malloc(len+1);
> +        path = qemu_malloc(len+1);
>           snprintf(path, len+1, "%.*s", len, str);
>       } else
>           path = strdup(str);

You need s/strdup/qemu_strdup/ here (and maybe elsewhere too), otherwise 
you'll mix strdup + qemu_free().

cheers,
   Gerd

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH]:Use qemu_malloc & qemu_free instead of malloc & free
@ 2009-05-05 10:31 vibisreenivasan
  2009-05-05 12:50 ` Gerd Hoffmann
  0 siblings, 1 reply; 4+ messages in thread
From: vibisreenivasan @ 2009-05-05 10:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Use qemu_malloc & qemu_free instead of malloc & free

Signed-off-by: vibi <vibi_sreenivasan@cms.com>
---
 qemu-sockets.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/qemu-sockets.c b/qemu-sockets.c
index 4111f82..f918dc0 100644
--- a/qemu-sockets.c
+++ b/qemu-sockets.c
@@ -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;
 }
-- 
1.6.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-06  9:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-05 10:09 [Qemu-devel] [PATCH] Use qemu_malloc & qemu_free instead of malloc & free vibisreenivasan
2009-05-05 10:31 [Qemu-devel] [PATCH]:Use " vibisreenivasan
2009-05-05 12:50 ` Gerd Hoffmann
2009-05-06  7:21   ` vibisreenivasan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.