]> git.alsa-project.org Git - alsa-gobject.git/commit
timer: skip check of return value from g_malloc()
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sat, 14 Nov 2020 08:28:09 +0000 (17:28 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Sun, 15 Nov 2020 00:19:56 +0000 (09:19 +0900)
commite8f3579364853387408eb0bc93819240d409184d
tree56a4d71e0f5f566a9b7113e4d2bd091cb99eec9b
parentdf2ef95f4df20f453e75b2ad0cbcf34e3e79adef
timer: 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/timer/instance-params.c
src/timer/query.c
src/timer/user-instance.c