]> git.alsa-project.org Git - alsa-gobject.git/commit
ctl: skip check of return value from g_malloc()
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 13 Nov 2020 07:26:26 +0000 (16:26 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 13 Nov 2020 07:26:26 +0000 (16:26 +0900)
commitbcf512a3bfe4010b1d6633393f3687b42ada402b
tree474914ac2a09e668c41a59bfd2199ef3b92e7686
parent5656fe9ca2dafe8214f1afa80c6c274dcc0903f6
ctl: 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/ctl/card.c
src/ctl/query.c