]> git.alsa-project.org Git - alsa-gobject.git/commit
hwdep: skip check of return value from g_malloc()
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 15 Nov 2020 14:04:32 +0000 (23:04 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Sun, 15 Nov 2020 23:57:30 +0000 (08:57 +0900)
commit24dbdf74242c98adfa1fdba29a60499bc97ea296
tree35f36fb81dcd39f4903a742e369895340b59eb15
parent7accd5105f6d3079dc4437eccbf3b2972d88b02e
hwdep: 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/hwdep/query.c