if (iter != NULL) {
restriction_rule = g_try_malloc0(
sizeof(stc_restriction_rule_s));
+ if (restriction_rule) {
+ _stc_dbus_dictionary_foreach(iter,
+ __stc_restriction_extract_rule_cb, restriction_rule);
- _stc_dbus_dictionary_foreach(iter,
- __stc_restriction_extract_rule_cb, restriction_rule);
-
- __stc_restriction_print_rule(restriction_rule);
-
- restriction_list = g_slist_append(restriction_list,
- (stc_restriction_rule_s *)restriction_rule);
+ __stc_restriction_print_rule(restriction_rule);
+ restriction_list = g_slist_append(restriction_list,
+ (stc_restriction_rule_s *)restriction_rule);
+ }
g_variant_iter_free(iter);
}
while (g_variant_iter_next(iter, "a{sv}", &iter_row)) {
restriction_rule = g_try_malloc0(
sizeof(stc_restriction_rule_s));
+ if (restriction_rule) {
+ _stc_dbus_dictionary_foreach(iter_row,
+ __stc_restriction_extract_rule_cb, restriction_rule);
- _stc_dbus_dictionary_foreach(iter_row,
- __stc_restriction_extract_rule_cb, restriction_rule);
-
- __stc_restriction_print_rule(restriction_rule);
-
- restriction_list = g_slist_append(restriction_list,
- (stc_restriction_rule_s *)restriction_rule);
+ __stc_restriction_print_rule(restriction_rule);
+ restriction_list = g_slist_append(restriction_list,
+ (stc_restriction_rule_s *)restriction_rule);
+ }
g_variant_iter_free(iter_row);
}
g_variant_iter_free(iter);