New Defects reported by Coverity Scan for sbabic/swupdate

20 views
Skip to first unread message

scan-...@coverity.com

unread,
Aug 19, 2026, 8:20:06 AMAug 19
to swup...@googlegroups.com

Hi,

Please find the latest report on new defect(s) introduced to sbabic/swupdate found with Coverity Scan.

  • New Defects Found: 6
  • 6 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
  • Defects Shown: Showing 6 of 6 defect(s)

Defect Details

** CID 653333:         (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 863           in start_webserver()
/mongoose/mongoose_interface.c: 870           in start_webserver()


_____________________________________________________________________________________________
*** CID 653333:           (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 863             in start_webserver()
857     		case 'r':
858     			free(opts.root);
859     			opts.root = strdup(optarg);
860     			break;
861     		case '?':
862     		default:
>>>     CID 653333:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.root" points to.
863     			return -EINVAL;
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
/mongoose/mongoose_interface.c: 870             in start_webserver()
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
869     		webserver_print_help();
>>>     CID 653333:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.root" points to.
870     		return -EINVAL;
871     	}
872     
873     	s_http_server_opts.root_dir =
874     		opts.root ? opts.root : MG_ROOT;
875     	if (!opts.listing)

** CID 653332:         (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 863           in start_webserver()
/mongoose/mongoose_interface.c: 870           in start_webserver()


_____________________________________________________________________________________________
*** CID 653332:           (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 863             in start_webserver()
857     		case 'r':
858     			free(opts.root);
859     			opts.root = strdup(optarg);
860     			break;
861     		case '?':
862     		default:
>>>     CID 653332:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.global_auth_file" points to.
863     			return -EINVAL;
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
/mongoose/mongoose_interface.c: 870             in start_webserver()
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
869     		webserver_print_help();
>>>     CID 653332:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.global_auth_file" points to.
870     		return -EINVAL;
871     	}
872     
873     	s_http_server_opts.root_dir =
874     		opts.root ? opts.root : MG_ROOT;
875     	if (!opts.listing)

** CID 653331:         (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 863           in start_webserver()
/mongoose/mongoose_interface.c: 870           in start_webserver()


_____________________________________________________________________________________________
*** CID 653331:           (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 863             in start_webserver()
857     		case 'r':
858     			free(opts.root);
859     			opts.root = strdup(optarg);
860     			break;
861     		case '?':
862     		default:
>>>     CID 653331:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.ssl_key" points to.
863     			return -EINVAL;
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
/mongoose/mongoose_interface.c: 870             in start_webserver()
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
869     		webserver_print_help();
>>>     CID 653331:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.ssl_key" points to.
870     		return -EINVAL;
871     	}
872     
873     	s_http_server_opts.root_dir =
874     		opts.root ? opts.root : MG_ROOT;
875     	if (!opts.listing)

** CID 653330:         (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 863           in start_webserver()
/mongoose/mongoose_interface.c: 870           in start_webserver()


_____________________________________________________________________________________________
*** CID 653330:           (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 863             in start_webserver()
857     		case 'r':
858     			free(opts.root);
859     			opts.root = strdup(optarg);
860     			break;
861     		case '?':
862     		default:
>>>     CID 653330:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.auth_domain" points to.
863     			return -EINVAL;
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
/mongoose/mongoose_interface.c: 870             in start_webserver()
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
869     		webserver_print_help();
>>>     CID 653330:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.auth_domain" points to.
870     		return -EINVAL;
871     	}
872     
873     	s_http_server_opts.root_dir =
874     		opts.root ? opts.root : MG_ROOT;
875     	if (!opts.listing)

** CID 653329:         (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 863           in start_webserver()
/mongoose/mongoose_interface.c: 870           in start_webserver()


_____________________________________________________________________________________________
*** CID 653329:           (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 863             in start_webserver()
857     		case 'r':
858     			free(opts.root);
859     			opts.root = strdup(optarg);
860     			break;
861     		case '?':
862     		default:
>>>     CID 653329:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.ssl_cert" points to.
863     			return -EINVAL;
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
/mongoose/mongoose_interface.c: 870             in start_webserver()
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
869     		webserver_print_help();
>>>     CID 653329:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.ssl_cert" points to.
870     		return -EINVAL;
871     	}
872     
873     	s_http_server_opts.root_dir =
874     		opts.root ? opts.root : MG_ROOT;
875     	if (!opts.listing)

** CID 653328:         (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 870           in start_webserver()
/mongoose/mongoose_interface.c: 863           in start_webserver()


_____________________________________________________________________________________________
*** CID 653328:           (RESOURCE_LEAK)
/mongoose/mongoose_interface.c: 870             in start_webserver()
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");
869     		webserver_print_help();
>>>     CID 653328:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.port" points to.
870     		return -EINVAL;
871     	}
872     
873     	s_http_server_opts.root_dir =
874     		opts.root ? opts.root : MG_ROOT;
875     	if (!opts.listing)
/mongoose/mongoose_interface.c: 863             in start_webserver()
857     		case 'r':
858     			free(opts.root);
859     			opts.root = strdup(optarg);
860     			break;
861     		case '?':
862     		default:
>>>     CID 653328:           (RESOURCE_LEAK)
>>>     Variable "opts" going out of scope leaks the storage "opts.port" points to.
863     			return -EINVAL;
864     		}
865     	}
866     
867     	if (optind < argc) {
868     		ERROR("Non-option or unrecognized argument(s) given to webserver (-w), see --help.");

  

View Defects in Coverity Scan

Best regards,

The Coverity Scan Admin Team

Reply all
Reply to author
Forward
0 new messages