Re: [PATCH v3 2/2] disas/sparc: Convert malloc/free to g_malloc/g_free

Michael Tokarev <[email protected]>
Newsgroups org.nongnu.qemu-trivial,org.nongnu.qemu-devel
Message-ID <[email protected]>
On 15.03.2026 15:59, Aadhya R wrote:
> Replace standard C memory allocators with GLib functions to safely handle out-of-memory aborts. Resolves GitLab issue #1798.
> 

> -  hash_buf = malloc (sizeof (* hash_buf) * num_opcodes);
> +  hash_buf = g_malloc(sizeof(*hash_buf) * num_opcodes);

This one is a good candicate for g_new(), not g_malloc().  FWIW.

/mjt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.