]> git.alsa-project.org Git - alsa-gobject.git/commit
rawmidi: skip check of return value from g_malloc()
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 16 Nov 2020 02:45:41 +0000 (11:45 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 16 Nov 2020 02:45:41 +0000 (11:45 +0900)
commit8a3441076680e27c0c59ae4a90fd93b5a2952b61
tree6c872e1a7004efb9ee8944f6b2333bcad11173cc
parentd5d5afa4a0649a9ca3fafeb5bd9eb72f4f1d4b9f
rawmidi: skip check of return value from g_malloc()

In GLib implementation, the call of g_malloc() can bring program abort
due to memory starvation. This is necessarily preferable because applications
cannot handle the case and GLib has alternative APIs named 'try' to
allow applications to handle the case.

On the other hand, the memory starvation is system wide issue and it's
hard for applications to solve the issue. It's reasonable for the
implementation to have program abort somehow.

Furthermore, the call of g_object_new() can bring program abort due
to memory starvation. It's impossible for applications to handle the
case.

This commit skips check of return value from g_malloc().

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/rawmidi/query.c