From e1713aa11d83c30531ed503ec59dab94de43f87f Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Wed, 13 Jun 2012 22:49:18 +0200 Subject: [PATCH] obexd: Use g_malloc0 in get_filter_strs Use g_malloc0 instead of g_try_malloc0 to allocate list. All users expects to get valid pointer from it anyway. Also size of allocated memory is small. --- obexd/client/pbap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c index 5ec7634ee..4428c149f 100644 --- a/obexd/client/pbap.c +++ b/obexd/client/pbap.c @@ -632,10 +632,7 @@ static gchar **get_filter_strs(uint64_t filter, gint *size) gint i; gint filter_list_size = sizeof(filter_list) / sizeof(filter_list[0]) - 1; - list = g_try_malloc0(sizeof(gchar **) * (FILTER_BIT_MAX + 2)); - - if (!list) - return NULL; + list = g_malloc0(sizeof(gchar **) * (FILTER_BIT_MAX + 2)); item = list; -- 2.47.3