mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
bbf: Fix bugs related to memory leak and linker
As per Amin's comments update the code to fix issue. Thanks Amin for the review
This commit is contained in:
parent
20f0c5211c
commit
a8804c5a25
3 changed files with 6 additions and 6 deletions
|
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* Author Rahul Thakur <rahul.thakur@iopsys.eu>
|
||||
*
|
||||
*/
|
||||
*/
|
||||
#include "dmentry.h"
|
||||
#include "x_iopsys_eu_igmp.h"
|
||||
|
||||
|
|
@ -590,7 +590,7 @@ static int get_igmp_snooping_interface(char *refparam, struct dmctx *ctx, void *
|
|||
uci_path_foreach_option_eq(bbfdm, "dmmap_bridge_port", "bridge_port", "bridge_key", br_inst, port) {
|
||||
dmuci_get_value_by_section_string(port, "mg_port", &mg);
|
||||
if (strcmp(mg, "true") == 0) {
|
||||
snprintf(linker, sizeof(linker), "%s+", section_name(port));
|
||||
snprintf(linker, sizeof(linker), "br_%s:%s+", br_inst, section_name(port));
|
||||
adm_entry_get_linker_param(ctx, dm_print_path("%s%cBridging%cBridge%c", dmroot,
|
||||
dm_delim, dm_delim, dm_delim), linker, value);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -590,7 +590,7 @@ static int get_mld_snooping_interface(char *refparam, struct dmctx *ctx, void *d
|
|||
uci_path_foreach_option_eq(bbfdm, "dmmap_bridge_port", "bridge_port", "bridge_key", br_inst, port) {
|
||||
dmuci_get_value_by_section_string(port, "mg_port", &mg);
|
||||
if (strcmp(mg, "true") == 0) {
|
||||
snprintf(linker, sizeof(linker), "%s+", section_name(port));
|
||||
snprintf(linker, sizeof(linker), "br_%s:%s+", br_inst, section_name(port));
|
||||
adm_entry_get_linker_param(ctx, dm_print_path("%s%cBridging%cBridge%c", dmroot,
|
||||
dm_delim, dm_delim, dm_delim), linker, value);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -800,7 +800,7 @@ void synchronize_specific_config_sections_with_dmmap_mcast_iface(char *package,
|
|||
if (proxy_iface != NULL) {
|
||||
struct uci_element *e;
|
||||
uci_foreach_element(proxy_iface, e) {
|
||||
char *p_ifname = strdup(e->name);
|
||||
char *p_ifname = dmstrdup(e->name);
|
||||
int found = 0;
|
||||
uci_path_foreach_option_eq(bbfdm, dmmap_package, dmmap_sec, "ifname",
|
||||
p_ifname, d_sec) {
|
||||
|
|
@ -831,7 +831,7 @@ void synchronize_specific_config_sections_with_dmmap_mcast_iface(char *package,
|
|||
if (snooping_iface != NULL) {
|
||||
struct uci_element *e;
|
||||
uci_foreach_element(snooping_iface, e) {
|
||||
char *s_ifname = strdup(e->name);
|
||||
char *s_ifname = dmstrdup(e->name);
|
||||
int found = 0;
|
||||
uci_path_foreach_option_eq(bbfdm, dmmap_package, dmmap_sec, "ifname",
|
||||
s_ifname, d_sec) {
|
||||
|
|
@ -901,7 +901,7 @@ void synchronize_specific_config_sections_with_dmmap_filter(char *package, char
|
|||
if (l != NULL) {
|
||||
struct uci_element *e;
|
||||
uci_foreach_element(l, e) {
|
||||
char *ip_addr = strdup(e->name);
|
||||
char *ip_addr = dmstrdup(e->name);
|
||||
int found = 0;
|
||||
uci_path_foreach_option_eq(bbfdm, dmmap_package, dmmap_sec, "ipaddr",
|
||||
ip_addr, d_sec) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue