]> sigrok.org Git - libsigrok.git/commitdiff
Replace g_malloc{0,} with g_try_malloc{0,}.
authorUwe Hermann <redacted>
Sat, 16 Apr 2011 12:17:51 +0000 (14:17 +0200)
committerUwe Hermann <redacted>
Sat, 16 Apr 2011 16:08:15 +0000 (18:08 +0200)
The g_malloc()/g_malloc0() versions exit/segfault if not enough memory
is available, which is not a good thing in libsigrok.

Instead, we use the g_try_malloc()/g_try_malloc0() variants, which
return NULL if not enough memory is available, so that the caller can
handle the error properly.


No differences found