All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in ui/shader.c
@ 2016-04-05 13:21 ` Md Haris Iqbal
  0 siblings, 0 replies; 10+ messages in thread
From: Md Haris Iqbal @ 2016-04-05 13:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Md Haris Iqbal, kraxel

Signed-off-by: Md Haris Iqbal <haris.phnx@gmail.com>
---
 ui/shader.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ui/shader.c b/ui/shader.c
index 9264009..1ffddbe 100644
--- a/ui/shader.c
+++ b/ui/shader.c
@@ -83,12 +83,12 @@ GLuint qemu_gl_create_compile_shader(GLenum type, const GLchar *src)
     glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
     if (!status) {
         glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &length);
-        errmsg = malloc(length);
+        errmsg = g_malloc(length);
         glGetShaderInfoLog(shader, length, &length, errmsg);
         fprintf(stderr, "%s: compile %s error\n%s\n", __func__,
                 (type == GL_VERTEX_SHADER) ? "vertex" : "fragment",
                 errmsg);
-        free(errmsg);
+        g_free(errmsg);
         return 0;
     }
     return shader;
@@ -108,10 +108,10 @@ GLuint qemu_gl_create_link_program(GLuint vert, GLuint frag)
     glGetProgramiv(program, GL_LINK_STATUS, &status);
     if (!status) {
         glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length);
-        errmsg = malloc(length);
+        errmsg = g_malloc(length);
         glGetProgramInfoLog(program, length, &length, errmsg);
         fprintf(stderr, "%s: link program: %s\n", __func__, errmsg);
-        free(errmsg);
+        g_free(errmsg);
         return 0;
     }
     return program;
-- 
1.9.1



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

end of thread, other threads:[~2016-05-11 11:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-05 13:21 [Qemu-trivial] [Qemu-devel] [PATCH v1] Changed malloc to g_malloc, free to g_free in ui/shader.c Md Haris Iqbal
2016-04-05 13:21 ` Md Haris Iqbal
2016-05-03  9:46 ` [Qemu-trivial] " haris iqbal
2016-05-03  9:46   ` haris iqbal
2016-05-03 10:12   ` [Qemu-trivial] " Gerd Hoffmann
2016-05-03 10:12     ` Gerd Hoffmann
2016-05-03 15:21     ` [Qemu-trivial] " haris iqbal
2016-05-03 15:21       ` haris iqbal
2016-05-11 11:34 ` [Qemu-trivial] " Gerd Hoffmann
2016-05-11 11:34   ` Gerd Hoffmann

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.