]> 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)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sat, 14 Nov 2020 08:28:09 +0000 (17:28 +0900)
commit62570cc3254d9f18834517e268b6b22ee261fe19
tree56a4d71e0f5f566a9b7113e4d2bd091cb99eec9b
parentbea634a220fa4235cc9b2b2b185f0fb1d648af18
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