- snprintf(cmd_data, len, "%s.%s=%s", conf_file_name, section_name, section_type);
- if (uci_lookup_ptr(ctx, &ptr, cmd_data, true) == UCI_OK) {
- ret_val = uci_set(ctx, &ptr);
- if (ret_val == UCI_OK) {
- //ret_val = uci_save(ctx, ptr.p);
+ if (cmd_data != NULL) {
+ snprintf(cmd_data, len, "%s.%s=%s", conf_file_name, section_name, section_type);
+ if (uci_lookup_ptr(ctx, &ptr, cmd_data, true) == UCI_OK) {
+ ret_val = uci_set(ctx, &ptr);
+ if (ret_val == UCI_OK) {
+ //ret_val = uci_save(ctx, ptr.p);
+ }