path = g_malloc0((gp->len + 1) * sizeof(char *));
- /* Fix : NULL_RETURNS */
- if (path == NULL)
- return NULL;
-
for (i = 0; i < gp->len; i++) {
gp_path = g_ptr_array_index(gp, i);
path[i] = g_strdup(gp_path);
g_variant_get(value, "ay", &desc_value_iter);
len = g_variant_get_size((GVariant *)desc_value_iter);
- if (len > 0) {
+ if (len > 0)
characteristic->description = (char *)g_malloc0(len + 1);
- if (!characteristic->description) {
- ret = BLUETOOTH_ERROR_OUT_OF_MEMORY;
- goto done;
- }
- }
+
for (i = 0; i < len; i++) {
g_variant_iter_loop(desc_value_iter, "y",
&characteristic->description[i]);
}
}
-done:
g_variant_iter_free(property_iter);
g_variant_unref(result);
g_object_unref(properties_proxy);