diff options
author | Szymon Janc <szymon@janc.net.pl> | 2012-06-13 22:49:18 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2012-06-14 14:31:48 +0300 |
commit | 962f0c10430ff0bd615e23ed36287da97de09f0d (patch) | |
tree | dd7d423e39c821083edcd35ccc14a25633ffafa2 | |
parent | b9c57af18d2a13de1857f76f61a3d15434f5c7cb (diff) | |
download | obexd-962f0c10430ff0bd615e23ed36287da97de09f0d.tar.gz |
client: 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.
-rw-r--r-- | client/pbap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/client/pbap.c b/client/pbap.c index 5ec7634..4428c14 100644 --- a/client/pbap.c +++ b/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; |