if (__validate_pcap(&pcap) == FALSE) {
STC_PCAP_DBUS_REPLY_ERROR(invocation, //LCOV_EXCL_LINE
STC_ERROR_INVALID_PARAMETER);
+ g_free(pcap.ifname);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
ret = stc_plugin_pcap_register_loop(pcap.ifname, pcap.nflog_group);
if (ret != STC_ERROR_NONE) {
STC_PCAP_DBUS_REPLY_ERROR(invocation, ret); //LCOV_EXCL_LINE
+ g_free(pcap.ifname);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
STC_DBUS_REPLY_ERROR_NONE(invocation);
+ g_free(pcap.ifname);
__STC_LOG_FUNC_EXIT__;
return TRUE;
}
if (__validate_pcap(&pcap) == FALSE) {
STC_PCAP_DBUS_REPLY_ERROR(invocation, //LCOV_EXCL_LINE
STC_ERROR_INVALID_PARAMETER);
+ g_free(pcap.ifname);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
ret = stc_plugin_pcap_unregister_loop(pcap.ifname, pcap.nflog_group);
if (ret != STC_ERROR_NONE) {
STC_PCAP_DBUS_REPLY_ERROR(invocation, ret); //LCOV_EXCL_LINE
+ g_free(pcap.ifname);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
STC_DBUS_REPLY_ERROR_NONE(invocation);
+ g_free(pcap.ifname);
__STC_LOG_FUNC_EXIT__;
return TRUE;
}
}
}
+static void __stc_free_restriction_rule_members(table_restrictions_info *rule)
+{
+ FREE(rule->app_id);
+ FREE(rule->ifname);
+ FREE(rule->subscriber_id);
+ FREE(rule->mac);
+}
+
gboolean handle_restriction_set(StcRestriction *object,
GDBusMethodInvocation *invocation,
GVariant *parameters,
if (__validate_rstn_rule(&rule) == FALSE) {
STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, //LCOV_EXCL_LINE
STC_ERROR_INVALID_PARAMETER);
+ __stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
if (ret != STC_ERROR_NONE) {
STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, //LCOV_EXCL_LINE
STC_ERROR_DB_FAILED);
+ __stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
stc_plugin_monitor_add_rstn(&rule);
STC_DBUS_REPLY_ERROR_NONE(invocation);
+ __stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__;
return TRUE;
}
if (__validate_rstn_rule(&rule) == FALSE) {
STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, //LCOV_EXCL_LINE
STC_ERROR_INVALID_PARAMETER);
+ __stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
if (ret != STC_ERROR_NONE) {
STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, //LCOV_EXCL_LINE
STC_ERROR_DB_FAILED);
+ __stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
stc_plugin_monitor_remove_rstn(&rule);
STC_DBUS_REPLY_ERROR_NONE(invocation);
+ __stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__;
return TRUE;
}
STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, ret); //LCOV_EXCL_LINE
g_variant_iter_free(iter_row);
g_variant_iter_free(iter);
+ __stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, ret); //LCOV_EXCL_LINE
g_variant_iter_free(iter_row);
g_variant_iter_free(iter);
+ __stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
}
+ __stc_free_restriction_rule_members(&rule);
g_variant_iter_free(iter_row);
}
g_variant_iter_free(iter);
STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, ret); //LCOV_EXCL_LINE
g_variant_iter_free(iter_row);
g_variant_iter_free(iter);
+ __stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
STC_RESTRICTION_DBUS_REPLY_ERROR(invocation, ret); //LCOV_EXCL_LINE
g_variant_iter_free(iter_row);
g_variant_iter_free(iter);
+ __stc_free_restriction_rule_members(&rule);
__STC_LOG_FUNC_EXIT__; //LCOV_EXCL_LINE
return TRUE;
}
}
+ __stc_free_restriction_rule_members(&rule);
g_variant_iter_free(iter_row);
}
g_variant_iter_free(iter);