]> 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)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Mon, 16 Nov 2020 12:04:53 +0000 (21:04 +0900)
commit08bccc4f21e3a3a2ee598198dab2f8aeb2f31be5
tree6c872e1a7004efb9ee8944f6b2333bcad11173cc
parentceb5b45a8a47b5c5ad658deb0f2ea37bf6edb132
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