Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] tslib-1.24/plugins/crop.c:189:16: warning[-Wanalyzer-malloc-leak]: leak of 'crop' tslib-1.24/plugins/crop.c:150:16: acquire_memory: allocated here tslib-1.24/plugins/crop.c:151:12: branch_false: following 'false' branch (when 'crop' is non-NULL)... tslib-1.24/plugins/crop.c:154:9: branch_false: ...to here tslib-1.24/plugins/crop.c:165:12: branch_false: following 'false' branch... tslib-1.24/plugins/crop.c:189:16: branch_false: ...to here tslib-1.24/plugins/crop.c:189:16: danger: 'crop' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 187| fclose(pcal_fd); # 188| } # 189|-> return &crop->module; # 190| } # 191| Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] tslib-1.24/plugins/debounce.c:259:13: warning[-Wanalyzer-malloc-leak]: leak of 'p' tslib-1.24/plugins/debounce.c:246:13: acquire_memory: allocated here tslib-1.24/plugins/debounce.c:247:12: branch_false: following 'false' branch (when 'p' is non-NULL)... tslib-1.24/plugins/debounce.c:250:9: branch_false: ...to here tslib-1.24/plugins/debounce.c:259:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/debounce.c:259:13: danger: 'p' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 257| p->mode_mt = NULL; # 258| # 259|-> if (tslib_parse_vars(&p->module, debounce_vars, NR_VARS, params)) { # 260| free(p); # 261| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] tslib-1.24/plugins/dejitter.c:371:13: warning[-Wanalyzer-malloc-leak]: leak of 'djt' tslib-1.24/plugins/dejitter.c:357:15: acquire_memory: allocated here tslib-1.24/plugins/dejitter.c:358:12: branch_false: following 'false' branch (when 'djt' is non-NULL)... tslib-1.24/plugins/dejitter.c:361:9: branch_false: ...to here tslib-1.24/plugins/dejitter.c:371:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/dejitter.c:371:13: danger: 'djt' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 369| djt->slots = 0; # 370| # 371|-> if (tslib_parse_vars(&djt->module, dejitter_vars, NR_VARS, params)) { # 372| free(djt); # 373| return NULL; Error: GCC_ANALYZER_WARNING (CWE-122): [#def4] tslib-1.24/plugins/evthres.c:278:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow tslib-1.24/plugins/evthres.c:173:12: branch_false: following 'false' branch (when 'count_nr == 0')... tslib-1.24/plugins/evthres.c:182:14: branch_false: ...to here tslib-1.24/plugins/evthres.c:182:12: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:185:15: branch_false: ...to here tslib-1.24/plugins/evthres.c:186:12: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:197:13: branch_false: ...to here tslib-1.24/plugins/evthres.c:198:20: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:205:29: branch_false: ...to here tslib-1.24/plugins/evthres.c:206:20: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:206:20: branch_false: ...to here tslib-1.24/plugins/evthres.c:209:29: branch_true: following 'true' branch (when 'i < max_slots')... tslib-1.24/plugins/evthres.c:210:47: branch_true: ...to here tslib-1.24/plugins/evthres.c:212:28: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:209:44: branch_false: ...to here tslib-1.24/plugins/evthres.c:209:29: branch_false: following 'false' branch (when 'i >= max_slots')... tslib-1.24/plugins/evthres.c:223:17: branch_false: ...to here tslib-1.24/plugins/evthres.c:226:12: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:234:12: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:245:21: branch_true: following 'true' branch... tslib-1.24/plugins/evthres.c:245:21: branch_true: ...to here tslib-1.24/plugins/evthres.c:246:29: branch_true: following 'true' branch (when 'j < max_slots')... tslib-1.24/plugins/evthres.c:247:35: branch_true: ...to here tslib-1.24/plugins/evthres.c:247:28: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:251:29: branch_false: ...to here tslib-1.24/plugins/evthres.c:251:28: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:265:31: branch_false: ...to here tslib-1.24/plugins/evthres.c:278:25: danger: write of '(long unsigned int)(*(struct evthres *)inf.size + 4294967295) * 88' bytes at offset 'i' exceeds the buffer # 276| # 277| /* accept one sample to buf */ # 278|-> memmove(&c->buf_mt[j][0], # 279| &c->buf_mt[j][1], # 280| (c->size - 1) * sizeof(c->buf_mt[j][0])); Error: GCC_ANALYZER_WARNING (CWE-122): [#def5] tslib-1.24/plugins/evthres.c:281:25: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow tslib-1.24/plugins/evthres.c:173:12: branch_false: following 'false' branch (when 'count_nr == 0')... tslib-1.24/plugins/evthres.c:182:14: branch_false: ...to here tslib-1.24/plugins/evthres.c:182:12: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:185:15: branch_false: ...to here tslib-1.24/plugins/evthres.c:186:12: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:197:13: branch_false: ...to here tslib-1.24/plugins/evthres.c:198:20: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:205:29: branch_false: ...to here tslib-1.24/plugins/evthres.c:206:20: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:206:20: branch_false: ...to here tslib-1.24/plugins/evthres.c:209:29: branch_true: following 'true' branch (when 'i < max_slots')... tslib-1.24/plugins/evthres.c:210:47: branch_true: ...to here tslib-1.24/plugins/evthres.c:212:28: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:209:44: branch_false: ...to here tslib-1.24/plugins/evthres.c:209:29: branch_false: following 'false' branch (when 'i >= max_slots')... tslib-1.24/plugins/evthres.c:223:17: branch_false: ...to here tslib-1.24/plugins/evthres.c:226:12: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:234:12: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:245:21: branch_true: following 'true' branch... tslib-1.24/plugins/evthres.c:245:21: branch_true: ...to here tslib-1.24/plugins/evthres.c:246:29: branch_true: following 'true' branch (when 'j < max_slots')... tslib-1.24/plugins/evthres.c:247:35: branch_true: ...to here tslib-1.24/plugins/evthres.c:247:28: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:251:29: branch_false: ...to here tslib-1.24/plugins/evthres.c:251:28: branch_false: following 'false' branch... tslib-1.24/plugins/evthres.c:265:31: branch_false: ...to here tslib-1.24/plugins/evthres.c:281:25: danger: out-of-bounds write # 279| &c->buf_mt[j][1], # 280| (c->size - 1) * sizeof(c->buf_mt[j][0])); # 281|-> c->buf_mt[j][c->size - 1] = samp[i][j]; # 282| c->full_mt[j]++; # 283| Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] tslib-1.24/plugins/evthres.c:369:13: warning[-Wanalyzer-malloc-leak]: leak of 'c' tslib-1.24/plugins/evthres.c:357:13: acquire_memory: allocated here tslib-1.24/plugins/evthres.c:358:12: branch_false: following 'false' branch (when 'c' is non-NULL)... tslib-1.24/plugins/evthres.c:361:9: branch_false: ...to here tslib-1.24/plugins/evthres.c:369:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/evthres.c:369:13: danger: 'c' leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) # 367| c->filling_mode = 1; # 368| # 369|-> if (tslib_parse_vars(&c->module, evthres_vars, NR_VARS, params)) { # 370| free(c); # 371| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] tslib-1.24/plugins/iir.c:244:13: warning[-Wanalyzer-malloc-leak]: leak of 'iir' tslib-1.24/plugins/iir.c:227:15: acquire_memory: allocated here tslib-1.24/plugins/iir.c:228:12: branch_false: following 'false' branch (when 'iir' is non-NULL)... tslib-1.24/plugins/iir.c:231:9: branch_false: ...to here tslib-1.24/plugins/iir.c:244:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/iir.c:244:13: danger: 'iir' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 242| iir->last_active = 0; # 243| # 244|-> if (tslib_parse_vars(&iir->module, iir_vars, NR_VARS, params)) { # 245| free(iir); # 246| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] tslib-1.24/plugins/input-raw.c:978:13: warning[-Wanalyzer-malloc-leak]: leak of 'i' tslib-1.24/plugins/input-raw.c:956:13: acquire_memory: allocated here tslib-1.24/plugins/input-raw.c:957:12: branch_false: following 'false' branch (when 'i' is non-NULL)... tslib-1.24/plugins/input-raw.c:960:9: branch_false: ...to here tslib-1.24/plugins/input-raw.c:978:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/input-raw.c:978:13: danger: 'i' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 976| i->last_pressure = NULL; # 977| # 978|-> if (tslib_parse_vars(&i->module, raw_vars, NR_VARS, params)) { # 979| free(i); # 980| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] tslib-1.24/plugins/invert.c:159:13: warning[-Wanalyzer-malloc-leak]: leak of 'ctx' tslib-1.24/plugins/invert.c:149:15: acquire_memory: allocated here tslib-1.24/plugins/invert.c:150:12: branch_false: following 'false' branch (when 'ctx' is non-NULL)... tslib-1.24/plugins/invert.c:153:9: branch_false: ...to here tslib-1.24/plugins/invert.c:159:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/invert.c:159:13: danger: 'ctx' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 157| ctx->invert_y = 0; # 158| # 159|-> if (tslib_parse_vars(&ctx->module, invert_vars, NR_VARS, params)) { # 160| free(ctx); # 161| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] tslib-1.24/plugins/linear.c:372:13: warning[-Wanalyzer-malloc-leak]: leak of 'lin' tslib-1.24/plugins/linear.c:307:15: acquire_memory: allocated here tslib-1.24/plugins/linear.c:308:12: branch_false: following 'false' branch (when 'lin' is non-NULL)... tslib-1.24/plugins/linear.c:311:9: branch_false: ...to here tslib-1.24/plugins/linear.c:333:12: branch_false: following 'false' branch... tslib-1.24/plugins/linear.c:372:13: branch_false: ...to here tslib-1.24/plugins/linear.c:372:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/linear.c:372:13: danger: 'lin' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 370| * Parse the parameters. # 371| */ # 372|-> if (tslib_parse_vars(&lin->module, linear_vars, NR_VARS, params)) { # 373| free(lin); # 374| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] tslib-1.24/plugins/lowpass.c:270:13: warning[-Wanalyzer-malloc-leak]: leak of 'var' tslib-1.24/plugins/lowpass.c:255:15: acquire_memory: allocated here tslib-1.24/plugins/lowpass.c:256:12: branch_false: following 'false' branch (when 'var' is non-NULL)... tslib-1.24/plugins/lowpass.c:259:9: branch_false: ...to here tslib-1.24/plugins/lowpass.c:270:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/lowpass.c:270:13: danger: 'var' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 268| var->flags_mt = NULL; # 269| # 270|-> if (tslib_parse_vars(&var->module, lowpass_vars, NR_VARS, params)) { # 271| free(var); # 272| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] tslib-1.24/plugins/median.c:427:13: warning[-Wanalyzer-malloc-leak]: leak of 'c' tslib-1.24/plugins/median.c:414:13: acquire_memory: allocated here tslib-1.24/plugins/median.c:415:12: branch_false: following 'false' branch (when 'c' is non-NULL)... tslib-1.24/plugins/median.c:418:9: branch_false: ...to here tslib-1.24/plugins/median.c:427:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/median.c:427:13: danger: 'c' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 425| c->usorted = NULL; # 426| # 427|-> if (tslib_parse_vars(&c->module, median_vars, NR_VARS, params)) { # 428| free(c); # 429| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] tslib-1.24/plugins/pthres.c:261:13: warning[-Wanalyzer-malloc-leak]: leak of 'p' tslib-1.24/plugins/pthres.c:245:13: acquire_memory: allocated here tslib-1.24/plugins/pthres.c:246:12: branch_false: following 'false' branch (when 'p' is non-NULL)... tslib-1.24/plugins/pthres.c:249:9: branch_false: ...to here tslib-1.24/plugins/pthres.c:261:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/pthres.c:261:13: danger: 'p' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 259| * Parse the parameters. # 260| */ # 261|-> if (tslib_parse_vars(&p->module, pthres_vars, NR_VARS, params)) { # 262| free(p); # 263| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] tslib-1.24/plugins/skip.c:486:13: warning[-Wanalyzer-malloc-leak]: leak of 'skip' tslib-1.24/plugins/skip.c:467:16: acquire_memory: allocated here tslib-1.24/plugins/skip.c:468:12: branch_false: following 'false' branch (when 'skip' is non-NULL)... tslib-1.24/plugins/skip.c:471:9: branch_false: ...to here tslib-1.24/plugins/skip.c:486:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/skip.c:486:13: danger: 'skip' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 484| reset_skip(skip); # 485| # 486|-> if (tslib_parse_vars(&skip->module, skip_vars, NR_VARS, params)) { # 487| free(skip); # 488| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] tslib-1.24/plugins/variance.c:394:13: warning[-Wanalyzer-malloc-leak]: leak of 'var' tslib-1.24/plugins/variance.c:380:15: acquire_memory: allocated here tslib-1.24/plugins/variance.c:381:12: branch_false: following 'false' branch (when 'var' is non-NULL)... tslib-1.24/plugins/variance.c:384:9: branch_false: ...to here tslib-1.24/plugins/variance.c:394:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/variance.c:394:13: danger: 'var' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 392| var->samp = NULL; # 393| # 394|-> if (tslib_parse_vars(&var->module, variance_vars, NR_VARS, params)) { # 395| free(var); # 396| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] tslib-1.24/plugins/waveshare-raw.c:342:13: warning[-Wanalyzer-malloc-leak]: leak of 'i' tslib-1.24/plugins/waveshare-raw.c:333:13: acquire_memory: allocated here tslib-1.24/plugins/waveshare-raw.c:334:12: branch_false: following 'false' branch (when 'i' is non-NULL)... tslib-1.24/plugins/waveshare-raw.c:337:9: branch_false: ...to here tslib-1.24/plugins/waveshare-raw.c:342:13: throw: if 'tslib_parse_vars' throws an exception... tslib-1.24/plugins/waveshare-raw.c:342:13: danger: 'i' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 340| i->len = 25; # 341| # 342|-> if (tslib_parse_vars(&i->module, raw_vars, NR_VARS, params)) { # 343| free(i); # 344| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] tslib-1.24/src/ts_config.c:79:25: warning[-Wanalyzer-malloc-leak]: leak of 'conffile' tslib-1.24/src/ts_config.c:188:5: enter_function: entry to 'ts_config' tslib-1.24/src/ts_config.c:190:16: call_function: calling '__ts_config' from 'ts_config' # 77| if (!f) { # 78| if (strdup_allocated) { # 79|-> ts_error("Couldn't open tslib config file %s: %s\n", # 80| conffile, strerror(errno)); # 81| free(conffile); Error: GCC_ANALYZER_WARNING (CWE-775): [#def18] tslib-1.24/src/ts_config.c:100:21: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(conffile, "r")' tslib-1.24/src/ts_config.c:193:5: enter_function: entry to 'ts_reconfig' tslib-1.24/src/ts_config.c:221:15: call_function: calling 'ts_config' from 'ts_reconfig' # 98| # 99| /* Did we read a whole line? */ # 100|-> if (buf[BUF_SIZE - 2] != '\0') { # 101| ts_error("%s: line %d too long\n", conffile, line); # 102| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] tslib-1.24/src/ts_config.c:100:21: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(conffile, "r")' tslib-1.24/src/ts_config.c:193:5: enter_function: entry to 'ts_reconfig' tslib-1.24/src/ts_config.c:221:15: call_function: calling 'ts_config' from 'ts_reconfig' # 98| # 99| /* Did we read a whole line? */ # 100|-> if (buf[BUF_SIZE - 2] != '\0') { # 101| ts_error("%s: line %d too long\n", conffile, line); # 102| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] tslib-1.24/src/ts_config.c:101:25: warning[-Wanalyzer-malloc-leak]: leak of 'conffile' tslib-1.24/src/ts_config.c:193:5: enter_function: entry to 'ts_reconfig' tslib-1.24/src/ts_config.c:221:15: call_function: calling 'ts_config' from 'ts_reconfig' # 99| /* Did we read a whole line? */ # 100| if (buf[BUF_SIZE - 2] != '\0') { # 101|-> ts_error("%s: line %d too long\n", conffile, line); # 102| break; # 103| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] tslib-1.24/src/ts_config.c:127:39: warning[-Wanalyzer-malloc-leak]: leak of 'conffile' tslib-1.24/src/ts_config.c:193:5: enter_function: entry to 'ts_reconfig' tslib-1.24/src/ts_config.c:221:15: call_function: calling 'ts_config' from 'ts_reconfig' # 125| discard_null_tokens(&p, &module_name); # 126| if (!conffile_modules) { # 127|-> ret = ts_load_module(ts, module_name, p); # 128| } else { # 129| #ifdef DEBUG Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] tslib-1.24/src/ts_config.c:145:39: warning[-Wanalyzer-malloc-leak]: leak of 'conffile' tslib-1.24/src/ts_config.c:193:5: enter_function: entry to 'ts_reconfig' tslib-1.24/src/ts_config.c:221:15: call_function: calling 'ts_config' from 'ts_reconfig' # 143| discard_null_tokens(&p, &module_name); # 144| if (!conffile_modules) { # 145|-> ret = ts_load_module_raw(ts, module_name, p); # 146| } else { # 147| #ifdef DEBUG Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] tslib-1.24/src/ts_config.c:159:25: warning[-Wanalyzer-malloc-leak]: leak of 'conffile' tslib-1.24/src/ts_config.c:193:5: enter_function: entry to 'ts_reconfig' tslib-1.24/src/ts_config.c:221:15: call_function: calling 'ts_config' from 'ts_reconfig' # 157| } # 158| } else { # 159|-> ts_error("%s: Unrecognised option %s:%d:%s\n", # 160| conffile, line, tok); # 161| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] tslib-1.24/src/ts_config.c:164:25: warning[-Wanalyzer-malloc-leak]: leak of 'conffile' tslib-1.24/src/ts_config.c:193:5: enter_function: entry to 'ts_reconfig' tslib-1.24/src/ts_config.c:221:15: call_function: calling 'ts_config' from 'ts_reconfig' # 162| } # 163| if (ret != 0) { # 164|-> ts_error("Couldn't load module %s\n", module_name); # 165| break; # 166| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def25] tslib-1.24/src/ts_config.c:169:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(conffile, "r")' tslib-1.24/src/ts_config.c:193:5: enter_function: entry to 'ts_reconfig' tslib-1.24/src/ts_config.c:221:15: call_function: calling 'ts_config' from 'ts_reconfig' # 167| } # 168| # 169|-> if (ts->list_raw == NULL) { # 170| ts_error("No raw modules loaded.\n"); # 171| ret = -1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] tslib-1.24/src/ts_config.c:169:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(conffile, "r")' tslib-1.24/src/ts_config.c:193:5: enter_function: entry to 'ts_reconfig' tslib-1.24/src/ts_config.c:221:15: call_function: calling 'ts_config' from 'ts_reconfig' # 167| } # 168| # 169|-> if (ts->list_raw == NULL) { # 170| ts_error("No raw modules loaded.\n"); # 171| ret = -1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] tslib-1.24/src/ts_config.c:170:17: warning[-Wanalyzer-malloc-leak]: leak of 'conffile' tslib-1.24/src/ts_config.c:193:5: enter_function: entry to 'ts_reconfig' tslib-1.24/src/ts_config.c:221:15: call_function: calling 'ts_config' from 'ts_reconfig' # 168| # 169| if (ts->list_raw == NULL) { # 170|-> ts_error("No raw modules loaded.\n"); # 171| ret = -1; # 172| } Error: GCC_ANALYZER_WARNING (CWE-404): [#def28] tslib-1.24/src/ts_error.c:36:15: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end' tslib-1.24/src/ts_error.c:35:9: acquire_resource: 'va_start' called here tslib-1.24/src/ts_error.c:36:15: throw: if the called function throws an exception... tslib-1.24/src/ts_error.c:36:15: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 34| # 35| va_start(ap, fmt); # 36|-> ret = ts_error_fn(fmt, ap); # 37| va_end(ap); # 38| Error: COMPILER_WARNING (CWE-704): [#def29] tslib-1.24/src/ts_load_module.c: scope_hint: In function '__ts_load_module_static' tslib-1.24/src/ts_load_module.c:148:16: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type # 148 | result = bsearch(&key, tslib_modules, countof(tslib_modules), # | ^ # 146| key.name = module; # 147| key.mod_init = NULL; # 148|-> result = bsearch(&key, tslib_modules, countof(tslib_modules), # 149| sizeof(struct tslib_module_desc), cmp_name); # 150| if (!result) Error: COMPILER_WARNING (CWE-704): [#def30] tslib-1.24/src/ts_load_module.c:148:16: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type # 146| key.name = module; # 147| key.mod_init = NULL; # 148|-> result = bsearch(&key, tslib_modules, countof(tslib_modules), # 149| sizeof(struct tslib_module_desc), cmp_name); # 150| if (!result) Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] tslib-1.24/src/ts_open.c:90:13: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(name)' tslib-1.24/src/ts_open.c:81:12: branch_false: following 'false' branch (when 'ts' is non-NULL)... tslib-1.24/src/ts_open.c:84:9: branch_false: ...to here tslib-1.24/src/ts_open.c:86:25: acquire_memory: allocated here tslib-1.24/src/ts_open.c:87:12: branch_false: following 'false' branch... tslib-1.24/src/ts_open.c:90:13: branch_false: ...to here tslib-1.24/src/ts_open.c:90:12: branch_true: following 'true' branch... tslib-1.24/src/ts_open.c:91:26: branch_true: ...to here tslib-1.24/src/ts_open.c:91:26: throw: if the called function throws an exception... tslib-1.24/src/ts_open.c:90:13: danger: 'strdup(name)' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) # 88| goto free; # 89| # 90|-> if (ts_open_restricted) { # 91| ts->fd = ts_open_restricted(name, flags, NULL); # 92| if (ts->fd == -1) Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] tslib-1.24/src/ts_open.c:91:26: warning[-Wanalyzer-malloc-leak]: leak of 'ts' tslib-1.24/src/ts_open.c:80:14: acquire_memory: allocated here tslib-1.24/src/ts_open.c:81:12: branch_false: following 'false' branch (when 'ts' is non-NULL)... tslib-1.24/src/ts_open.c:84:9: branch_false: ...to here tslib-1.24/src/ts_open.c:87:12: branch_false: following 'false' branch... tslib-1.24/src/ts_open.c:90:13: branch_false: ...to here tslib-1.24/src/ts_open.c:90:12: branch_true: following 'true' branch... tslib-1.24/src/ts_open.c:91:26: branch_true: ...to here tslib-1.24/src/ts_open.c:91:26: throw: if the called function throws an exception... tslib-1.24/src/ts_open.c:91:26: danger: 'ts' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 89| # 90| if (ts_open_restricted) { # 91|-> ts->fd = ts_open_restricted(name, flags, NULL); # 92| if (ts->fd == -1) # 93| goto free; Error: GCC_ANALYZER_WARNING (CWE-401): [#def33] tslib-1.24/src/ts_open.c:98:18: warning[-Wanalyzer-malloc-leak]: leak of 'ts' tslib-1.24/src/ts_open.c:80:14: acquire_memory: allocated here tslib-1.24/src/ts_open.c:81:12: branch_false: following 'false' branch (when 'ts' is non-NULL)... tslib-1.24/src/ts_open.c:84:9: branch_false: ...to here tslib-1.24/src/ts_open.c:87:12: branch_false: following 'false' branch... tslib-1.24/src/ts_open.c:90:13: branch_false: ...to here tslib-1.24/src/ts_open.c:90:12: branch_false: following 'false' branch... tslib-1.24/src/ts_open.c:98:18: branch_false: ...to here tslib-1.24/src/ts_open.c:98:18: throw: if 'open' throws an exception... tslib-1.24/src/ts_open.c:98:18: danger: 'ts' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0) # 96| } # 97| # 98|-> ts->fd = open(name, flags); # 99| /* # 100| * Try again in case file is simply not writable Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] tslib-1.24/src/ts_open.c:109:26: warning[-Wanalyzer-malloc-leak]: leak of 'ts' tslib-1.24/src/ts_open.c:80:14: acquire_memory: allocated here tslib-1.24/src/ts_open.c:81:12: branch_false: following 'false' branch (when 'ts' is non-NULL)... tslib-1.24/src/ts_open.c:84:9: branch_false: ...to here tslib-1.24/src/ts_open.c:87:12: branch_false: following 'false' branch... tslib-1.24/src/ts_open.c:90:13: branch_false: ...to here tslib-1.24/src/ts_open.c:90:12: branch_false: following 'false' branch... tslib-1.24/src/ts_open.c:98:18: branch_false: ...to here tslib-1.24/src/ts_open.c:103:12: branch_true: following 'true' branch... tslib-1.24/src/ts_open.c:109:26: throw: if 'open' throws an exception... tslib-1.24/src/ts_open.c:109:26: danger: 'ts' leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0) # 107| flags = O_RDONLY; # 108| #endif # 109|-> ts->fd = open(name, flags); # 110| } # 111| if (ts->fd == -1) Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] tslib-1.24/src/ts_setup.c:76:60: warning[-Wanalyzer-malloc-leak]: leak of 'scan_devices()' tslib-1.24/src/ts_setup.c:118:15: enter_function: entry to 'ts_setup' tslib-1.24/src/ts_setup.c:142:12: branch_true: following 'true' branch (when 'ts' is NULL)... tslib-1.24/src/ts_setup.c:143:25: branch_true: ...to here tslib-1.24/src/ts_setup.c:143:25: call_function: calling 'scan_devices' from 'ts_setup' tslib-1.24/src/ts_setup.c:143:25: return_function: returning to 'ts_setup' from 'scan_devices' tslib-1.24/src/ts_setup.c:144:20: branch_false: following 'false' branch... tslib-1.24/src/ts_setup.c:147:22: branch_false: ...to here tslib-1.24/src/ts_setup.c:147:22: throw: if 'ts_open' throws an exception... tslib-1.24/src/ts_setup.c:76:60: danger: 'scan_devices()' leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9) # 74| # 75| snprintf(fname, sizeof(fname), # 76|-> "%s/%s", DEV_INPUT_EVENT, namelist[i]->d_name); # 77| fd = open(fname, O_RDONLY); # 78| if (fd < 0) Error: GCC_ANALYZER_WARNING (CWE-479): [#def36] tslib-1.24/tests/ts_finddev.c:38:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘printf’ from within signal handler tslib-1.24/tests/ts_finddev.c:43:5: enter_function: entry to ‘main’ tslib-1.24/tests/ts_finddev.c:51:12: branch_false: following ‘false’ branch (when ‘argc == 3’)... tslib-1.24/tests/ts_finddev.c:54:9: branch_false: ...to here tslib-1.24/tests/ts_finddev.c:56:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_finddev.c:59:14: branch_false: ...to here tslib-1.24/tests/ts_finddev.c:60:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_finddev.c:63:12: branch_false: ...to here tslib-1.24/tests/ts_finddev.c:63:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_finddev.c:66:9: branch_false: ...to here tslib-1.24/tests/ts_finddev.c:35:13: enter_function: entry to ‘alarm_handler’ tslib-1.24/tests/ts_finddev.c:38:9: danger: call to ‘printf’ from within signal handler # 36| { # 37| /* time is expired */ # 38|-> printf("signal %d caught\n", sig); # 39| # 40| exit(0); Error: GCC_ANALYZER_WARNING (CWE-479): [#def37] tslib-1.24/tests/ts_finddev.c:40:9: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler tslib-1.24/tests/ts_finddev.c:43:5: enter_function: entry to ‘main’ tslib-1.24/tests/ts_finddev.c:51:12: branch_false: following ‘false’ branch (when ‘argc == 3’)... tslib-1.24/tests/ts_finddev.c:54:9: branch_false: ...to here tslib-1.24/tests/ts_finddev.c:56:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_finddev.c:59:14: branch_false: ...to here tslib-1.24/tests/ts_finddev.c:60:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_finddev.c:63:12: branch_false: ...to here tslib-1.24/tests/ts_finddev.c:63:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_finddev.c:66:9: branch_false: ...to here tslib-1.24/tests/ts_finddev.c:35:13: enter_function: entry to ‘alarm_handler’ tslib-1.24/tests/ts_finddev.c:40:9: danger: call to ‘exit’ from within signal handler # 38| printf("signal %d caught\n", sig); # 39| # 40|-> exit(0); # 41| } # 42| Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] tslib-1.24/tests/ts_print_mt.c:224:31: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_print_mt.c:165:20: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_print_mt.c:257:1: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:186:12: branch_false: following ‘false’ branch (when ‘ts’ is non-NULL)... tslib-1.24/tests/ts_print_mt.c:191:9: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:195:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_print_mt.c:201:21: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:203:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_print_mt.c:206:19: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:207:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_print_mt.c:207:12: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:211:21: branch_true: following ‘true’ branch (when ‘i < read_samples’)... tslib-1.24/tests/ts_print_mt.c:212:30: branch_true: ...to here tslib-1.24/tests/ts_print_mt.c:212:30: acquire_memory: allocated here tslib-1.24/tests/ts_print_mt.c:213:20: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_print_mt.c:211:39: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:211:21: branch_false: following ‘false’ branch (when ‘i >= read_samples’)... tslib-1.24/tests/ts_print_mt.c:211:21: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:223:20: branch_true: following ‘true’ branch (when ‘raw != 0’)... tslib-1.24/tests/ts_print_mt.c:224:31: branch_true: ...to here tslib-1.24/tests/ts_print_mt.c:224:31: throw: if ‘ts_read_raw_mt’ throws an exception... tslib-1.24/tests/ts_print_mt.c:224:31: danger: ‘<unknown>’ leaks here; was allocated at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12) # 222| while (1) { # 223| if (raw) # 224|-> ret = ts_read_raw_mt(ts, samp_mt, max_slots, read_samples); # 225| else # 226| ret = ts_read_mt(ts, samp_mt, max_slots, read_samples); Error: GCC_ANALYZER_WARNING (CWE-401): [#def39] tslib-1.24/tests/ts_print_mt.c:224:31: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_print_mt.c:165:20: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_print_mt.c:257:1: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:186:12: branch_false: following ‘false’ branch (when ‘ts’ is non-NULL)... tslib-1.24/tests/ts_print_mt.c:191:9: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:195:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_print_mt.c:201:21: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:203:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_print_mt.c:206:19: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:206:19: acquire_memory: allocated here tslib-1.24/tests/ts_print_mt.c:207:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_print_mt.c:207:12: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:211:21: branch_true: following ‘true’ branch (when ‘i < read_samples’)... tslib-1.24/tests/ts_print_mt.c:212:30: branch_true: ...to here tslib-1.24/tests/ts_print_mt.c:213:20: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_print_mt.c:211:39: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:211:21: branch_false: following ‘false’ branch (when ‘i >= read_samples’)... tslib-1.24/tests/ts_print_mt.c:211:21: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:223:20: branch_true: following ‘true’ branch (when ‘raw != 0’)... tslib-1.24/tests/ts_print_mt.c:224:31: branch_true: ...to here tslib-1.24/tests/ts_print_mt.c:224:31: throw: if ‘ts_read_raw_mt’ throws an exception... tslib-1.24/tests/ts_print_mt.c:224:31: danger: ‘samp_mt’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8) # 222| while (1) { # 223| if (raw) # 224|-> ret = ts_read_raw_mt(ts, samp_mt, max_slots, read_samples); # 225| else # 226| ret = ts_read_mt(ts, samp_mt, max_slots, read_samples); Error: GCC_ANALYZER_WARNING (CWE-401): [#def40] tslib-1.24/tests/ts_print_mt.c:226:31: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_print_mt.c:186:12: branch_false: following ‘false’ branch (when ‘ts’ is non-NULL)... tslib-1.24/tests/ts_print_mt.c:191:9: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:195:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_print_mt.c:201:21: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:203:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_print_mt.c:206:19: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:207:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_print_mt.c:207:12: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:211:21: branch_true: following ‘true’ branch (when ‘i < read_samples’)... tslib-1.24/tests/ts_print_mt.c:212:30: branch_true: ...to here tslib-1.24/tests/ts_print_mt.c:212:30: acquire_memory: allocated here tslib-1.24/tests/ts_print_mt.c:213:20: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_print_mt.c:211:39: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:211:21: branch_false: following ‘false’ branch (when ‘i >= read_samples’)... tslib-1.24/tests/ts_print_mt.c:211:21: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:223:20: branch_false: following ‘false’ branch (when ‘raw == 0’)... tslib-1.24/tests/ts_print_mt.c:226:31: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:226:31: throw: if ‘ts_read_mt’ throws an exception... tslib-1.24/tests/ts_print_mt.c:226:31: danger: ‘<unknown>’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10) # 224| ret = ts_read_raw_mt(ts, samp_mt, max_slots, read_samples); # 225| else # 226|-> ret = ts_read_mt(ts, samp_mt, max_slots, read_samples); # 227| # 228| if (ret < 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def41] tslib-1.24/tests/ts_print_mt.c:226:31: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_print_mt.c:186:12: branch_false: following ‘false’ branch (when ‘ts’ is non-NULL)... tslib-1.24/tests/ts_print_mt.c:191:9: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:195:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_print_mt.c:201:21: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:203:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_print_mt.c:206:19: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:206:19: acquire_memory: allocated here tslib-1.24/tests/ts_print_mt.c:207:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_print_mt.c:207:12: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:211:21: branch_true: following ‘true’ branch (when ‘i < read_samples’)... tslib-1.24/tests/ts_print_mt.c:212:30: branch_true: ...to here tslib-1.24/tests/ts_print_mt.c:213:20: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_print_mt.c:211:39: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:211:21: branch_false: following ‘false’ branch (when ‘i >= read_samples’)... tslib-1.24/tests/ts_print_mt.c:211:21: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:223:20: branch_false: following ‘false’ branch (when ‘raw == 0’)... tslib-1.24/tests/ts_print_mt.c:226:31: branch_false: ...to here tslib-1.24/tests/ts_print_mt.c:226:31: throw: if ‘ts_read_mt’ throws an exception... tslib-1.24/tests/ts_print_mt.c:226:31: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6) # 224| ret = ts_read_raw_mt(ts, samp_mt, max_slots, read_samples); # 225| else # 226|-> ret = ts_read_mt(ts, samp_mt, max_slots, read_samples); # 227| # 228| if (ret < 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def42] tslib-1.24/tests/ts_test_mt_sdl.c:144:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:144:9: throw: if ‘SDL_SetMainReady’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8) # 142| } # 143| # 144|-> SDL_SetMainReady(); # 145| # 146| if (SDL_Init(SDL_INIT_VIDEO) < 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def43] tslib-1.24/tests/ts_test_mt_sdl.c:144:9: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:144:9: throw: if ‘SDL_SetMainReady’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6) # 142| } # 143| # 144|-> SDL_SetMainReady(); # 145| # 146| if (SDL_Init(SDL_INIT_VIDEO) < 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def44] tslib-1.24/tests/ts_test_mt_sdl.c:146:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:13: throw: if ‘SDL_Init’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:146:13: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8) # 144| SDL_SetMainReady(); # 145| # 146|-> if (SDL_Init(SDL_INIT_VIDEO) < 0) { # 147| SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, # 148| "Couldn't initialize SDL: %s", SDL_GetError()); Error: GCC_ANALYZER_WARNING (CWE-401): [#def45] tslib-1.24/tests/ts_test_mt_sdl.c:146:13: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:13: throw: if ‘SDL_Init’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:146:13: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6) # 144| SDL_SetMainReady(); # 145| # 146|-> if (SDL_Init(SDL_INIT_VIDEO) < 0) { # 147| SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, # 148| "Couldn't initialize SDL: %s", SDL_GetError()); Error: GCC_ANALYZER_WARNING (CWE-401): [#def46] tslib-1.24/tests/ts_test_mt_sdl.c:147:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_true: following ‘true’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:147:17: branch_true: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:147:17: throw: if ‘SDL_GetError’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:147:17: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8) # 145| # 146| if (SDL_Init(SDL_INIT_VIDEO) < 0) { # 147|-> SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, # 148| "Couldn't initialize SDL: %s", SDL_GetError()); # 149| goto out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def47] tslib-1.24/tests/ts_test_mt_sdl.c:147:17: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_true: following ‘true’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:147:17: branch_true: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:147:17: throw: if ‘SDL_GetError’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:147:17: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6) # 145| # 146| if (SDL_Init(SDL_INIT_VIDEO) < 0) { # 147|-> SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, # 148| "Couldn't initialize SDL: %s", SDL_GetError()); # 149| goto out; Error: GCC_ANALYZER_WARNING (CWE-401): [#def48] tslib-1.24/tests/ts_test_mt_sdl.c:152:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:13: throw: if ‘SDL_CreateWindowAndRenderer’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8) # 150| } # 151| # 152|-> if (SDL_CreateWindowAndRenderer(0, 0, # 153| SDL_WINDOW_FULLSCREEN_DESKTOP, # 154| &sdlWindow, &sdlRenderer)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def49] tslib-1.24/tests/ts_test_mt_sdl.c:152:13: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:13: throw: if ‘SDL_CreateWindowAndRenderer’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6) # 150| } # 151| # 152|-> if (SDL_CreateWindowAndRenderer(0, 0, # 153| SDL_WINDOW_FULLSCREEN_DESKTOP, # 154| &sdlWindow, &sdlRenderer)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def50] tslib-1.24/tests/ts_test_mt_sdl.c:155:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_true: following ‘true’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:155:17: branch_true: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:155:17: throw: if ‘SDL_GetError’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:155:17: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8) # 153| SDL_WINDOW_FULLSCREEN_DESKTOP, # 154| &sdlWindow, &sdlRenderer)) { # 155|-> SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, # 156| "Couldn't create window and renderer: %s", # 157| SDL_GetError()); Error: GCC_ANALYZER_WARNING (CWE-401): [#def51] tslib-1.24/tests/ts_test_mt_sdl.c:155:17: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_true: following ‘true’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:155:17: branch_true: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:155:17: throw: if ‘SDL_GetError’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:155:17: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6) # 153| SDL_WINDOW_FULLSCREEN_DESKTOP, # 154| &sdlWindow, &sdlRenderer)) { # 155|-> SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, # 156| "Couldn't create window and renderer: %s", # 157| SDL_GetError()); Error: GCC_ANALYZER_WARNING (CWE-401): [#def52] tslib-1.24/tests/ts_test_mt_sdl.c:161:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:161:9: throw: if ‘SDL_ShowCursor’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8) # 159| } # 160| # 161|-> SDL_ShowCursor(SDL_DISABLE); # 162| SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); # 163| Error: GCC_ANALYZER_WARNING (CWE-401): [#def53] tslib-1.24/tests/ts_test_mt_sdl.c:161:9: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:161:9: throw: if ‘SDL_ShowCursor’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6) # 159| } # 160| # 161|-> SDL_ShowCursor(SDL_DISABLE); # 162| SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); # 163| Error: GCC_ANALYZER_WARNING (CWE-401): [#def54] tslib-1.24/tests/ts_test_mt_sdl.c:162:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:162:9: throw: if ‘SDL_SetHint’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:162:9: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/8) # 160| # 161| SDL_ShowCursor(SDL_DISABLE); # 162|-> SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); # 163| # 164| SDL_SetRenderDrawColor(sdlRenderer, 0, 0, 0, 255); Error: GCC_ANALYZER_WARNING (CWE-401): [#def55] tslib-1.24/tests/ts_test_mt_sdl.c:162:9: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:162:9: throw: if ‘SDL_SetHint’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:162:9: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6) # 160| # 161| SDL_ShowCursor(SDL_DISABLE); # 162|-> SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); # 163| # 164| SDL_SetRenderDrawColor(sdlRenderer, 0, 0, 0, 255); Error: GCC_ANALYZER_WARNING (CWE-401): [#def56] tslib-1.24/tests/ts_test_mt_sdl.c:164:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:164:9: throw: if ‘SDL_SetRenderDrawColor’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:164:9: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/8) # 162| SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); # 163| # 164|-> SDL_SetRenderDrawColor(sdlRenderer, 0, 0, 0, 255); # 165| SDL_RenderClear(sdlRenderer); # 166| Error: GCC_ANALYZER_WARNING (CWE-401): [#def57] tslib-1.24/tests/ts_test_mt_sdl.c:164:9: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:164:9: throw: if ‘SDL_SetRenderDrawColor’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:164:9: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/6) # 162| SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); # 163| # 164|-> SDL_SetRenderDrawColor(sdlRenderer, 0, 0, 0, 255); # 165| SDL_RenderClear(sdlRenderer); # 166| Error: GCC_ANALYZER_WARNING (CWE-401): [#def58] tslib-1.24/tests/ts_test_mt_sdl.c:165:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:165:9: throw: if ‘SDL_RenderClear’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:165:9: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/8) # 163| # 164| SDL_SetRenderDrawColor(sdlRenderer, 0, 0, 0, 255); # 165|-> SDL_RenderClear(sdlRenderer); # 166| # 167| while (1) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def59] tslib-1.24/tests/ts_test_mt_sdl.c:165:9: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:165:9: throw: if ‘SDL_RenderClear’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:165:9: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/6) # 163| # 164| SDL_SetRenderDrawColor(sdlRenderer, 0, 0, 0, 255); # 165|-> SDL_RenderClear(sdlRenderer); # 166| # 167| while (1) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def60] tslib-1.24/tests/ts_test_mt_sdl.c:168:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:168:23: throw: if ‘ts_read_mt’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:168:23: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/8) # 166| # 167| while (1) { # 168|-> ret = ts_read_mt(ts, samp_mt, max_slots, 1); # 169| if (ret < 0) { # 170| SDL_Quit(); Error: GCC_ANALYZER_WARNING (CWE-401): [#def61] tslib-1.24/tests/ts_test_mt_sdl.c:168:23: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:146:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:152:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:152:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:161:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:168:23: throw: if ‘ts_read_mt’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:168:23: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/6) # 166| # 167| while (1) { # 168|-> ret = ts_read_mt(ts, samp_mt, max_slots, 1); # 169| if (ret < 0) { # 170| SDL_Quit(); Error: GCC_ANALYZER_WARNING (CWE-401): [#def62] tslib-1.24/tests/ts_test_mt_sdl.c:212:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:137:22: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:212:17: throw: if ‘ts_close’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:212:17: danger: ‘<unknown>’ leaks here; was allocated at [(9)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/8) # 210| out: # 211| if (ts) # 212|-> ts_close(ts); # 213| # 214| if (samp_mt) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def63] tslib-1.24/tests/ts_test_mt_sdl.c:212:17: warning[-Wanalyzer-malloc-leak]: leak of ‘samp_mt’ tslib-1.24/tests/ts_test_mt_sdl.c:115:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:121:13: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:121:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:127:21: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:129:12: branch_false: following ‘false’ branch (when ‘user_slots == 0’)... tslib-1.24/tests/ts_test_mt_sdl.c:132:19: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:132:19: acquire_memory: allocated here tslib-1.24/tests/ts_test_mt_sdl.c:133:12: branch_false: following ‘false’ branch (when ‘samp_mt’ is non-NULL)... tslib-1.24/tests/ts_test_mt_sdl.c:137:22: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:138:12: branch_false: following ‘false’ branch... tslib-1.24/tests/ts_test_mt_sdl.c:144:9: branch_false: ...to here tslib-1.24/tests/ts_test_mt_sdl.c:212:17: throw: if ‘ts_close’ throws an exception... tslib-1.24/tests/ts_test_mt_sdl.c:212:17: danger: ‘samp_mt’ leaks here; was allocated at [(7)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/6) # 210| out: # 211| if (ts) # 212|-> ts_close(ts); # 213| # 214| if (samp_mt) { Error: GCC_ANALYZER_WARNING (CWE-688): [#def64] tslib-1.24/tests/ts_verify.c:490:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘data.tsconf’ where non-null expected tslib-1.24/tests/ts_verify.c:489:23: acquire_memory: this call could return NULL tslib-1.24/tests/ts_verify.c:490:9: danger: argument 4 (‘fopen("ts_verify_ts.conf", "a+")’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected #argument 4 of ‘__builtin_fwrite’ must be non-null # 488| unlink(CONFFILE); # 489| data.tsconf = fopen(CONFFILE, "a+"); # 490|-> fprintf(data.tsconf, "module_raw input\n"); # 491| fclose(data.tsconf); # 492|
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-157.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | tslib-1.24-1.fc44 |
| store-results-to | /tmp/tmp8xfey584/tslib-1.24-1.fc44.tar.xz |
| time-created | 2026-01-08 21:53:45 |
| time-finished | 2026-01-08 21:55:18 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp8xfey584/tslib-1.24-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp8xfey584/tslib-1.24-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |