Fix the valgrind issue.
authorSung-jae Park <nicesj.park@samsung.com>
Thu, 25 Apr 2013 07:03:24 +0000 (16:03 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Thu, 25 Apr 2013 07:03:24 +0000 (16:03 +0900)
Access the buffer->info after release the buffer

Change-Id: I77dad69f43ac156bbda9d190a7e347b29d7b9389

src/buffer_handler.c

index 1721e86..4ba5da3 100644 (file)
@@ -1026,13 +1026,14 @@ HAPI int buffer_handler_pixmap_unref(void *buffer_ptr)
 
        s_info.pixmap_list = eina_list_remove(s_info.pixmap_list, buffer);
 
+       info = buffer->info;
+
        if (destroy_gem(buffer) < 0)
                ErrPrint("Failed to destroy gem buffer\n");
 
        if (destroy_pixmap(buffer) < 0)
                ErrPrint("Failed to destroy pixmap\n");
 
-       info = buffer->info;
        if (info && info->buffer == buffer)
                info->buffer = NULL;