cups-2.4.16-4.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-563): [#def1]
/usr/bin/cups-config:17:1: warning[SC2034]: prefix appears unused. Verify use (or export if used externally).
#   15|   BUILD="cups-2.4.16"
#   16|   
#   17|-> prefix=/usr
#   18|   exec_prefix=/usr
#   19|   bindir=/usr/bin

Error: SHELLCHECK_WARNING (CWE-563): [#def2]
/usr/bin/cups-config:18:1: warning[SC2034]: exec_prefix appears unused. Verify use (or export if used externally).
#   16|   
#   17|   prefix=/usr
#   18|-> exec_prefix=/usr
#   19|   bindir=/usr/bin
#   20|   includedir=/usr/include

Error: SHELLCHECK_WARNING (CWE-563): [#def3]
/usr/bin/cups-config:19:1: warning[SC2034]: bindir appears unused. Verify use (or export if used externally).
#   17|   prefix=/usr
#   18|   exec_prefix=/usr
#   19|-> bindir=/usr/bin
#   20|   includedir=/usr/include
#   21|   # Fetch libdir from gnutls's pkg-config script.  This is a bit

Error: SHELLCHECK_WARNING (CWE-563): [#def4]
/usr/bin/cups-config:24:1: warning[SC2034]: datarootdir appears unused. Verify use (or export if used externally).
#   22|   # of a cheat, but the cups-devel package requires gnutls-devel anyway.
#   23|   libdir=`pkg-config --variable=libdir gnutls`
#   24|-> datarootdir=/usr/share
#   25|   datadir=/usr/share
#   26|   sysconfdir=/etc

Error: SHELLCHECK_WARNING (CWE-563): [#def5]
/usr/bin/cups-config:25:1: warning[SC2034]: datadir appears unused. Verify use (or export if used externally).
#   23|   libdir=`pkg-config --variable=libdir gnutls`
#   24|   datarootdir=/usr/share
#   25|-> datadir=/usr/share
#   26|   sysconfdir=/etc
#   27|   cups_datadir=/usr/share/cups

Error: SHELLCHECK_WARNING (CWE-563): [#def6]
/usr/bin/cups-config:26:1: warning[SC2034]: sysconfdir appears unused. Verify use (or export if used externally).
#   24|   datarootdir=/usr/share
#   25|   datadir=/usr/share
#   26|-> sysconfdir=/etc
#   27|   cups_datadir=/usr/share/cups
#   28|   cups_serverbin=/usr/lib/cups

Error: CPPCHECK_WARNING (CWE-401): [#def7]
cups-2.4.16/backend/dnssd.c:883: error[memleak]: Memory leak: device.fullName
#  881|         }
#  882|   
#  883|->       return (device);
#  884|       }
#  885|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
cups-2.4.16/backend/dnssd.c:901:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/backend/dnssd.c:890:6: branch_false: following ‘false’ branch (when ‘device’ is non-NULL)...
cups-2.4.16/backend/dnssd.c:896:22: branch_false: ...to here
cups-2.4.16/backend/dnssd.c:896:22: acquire_memory: allocated here
cups-2.4.16/backend/dnssd.c:901:3: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/backend/dnssd.c:901:3: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  899|     device->priority = 50;
#  900|   
#  901|->   cupsArrayAdd(devices, device);
#  902|   
#  903|    /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
cups-2.4.16/backend/dnssd.c:901:3: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
cups-2.4.16/backend/dnssd.c:890:17: acquire_memory: allocated here
cups-2.4.16/backend/dnssd.c:890:6: branch_false: following ‘false’ branch (when ‘device’ is non-NULL)...
cups-2.4.16/backend/dnssd.c:896:22: branch_false: ...to here
cups-2.4.16/backend/dnssd.c:901:3: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/backend/dnssd.c:901:3: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  899|     device->priority = 50;
#  900|   
#  901|->   cupsArrayAdd(devices, device);
#  902|   
#  903|    /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
cups-2.4.16/backend/failover.c:446:7: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(tmp)’
cups-2.4.16/backend/failover.c:425:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/failover.c:435:3: branch_false: ...to here
cups-2.4.16/backend/failover.c:437:6: branch_true: following ‘true’ branch...
cups-2.4.16/backend/failover.c:439:5: branch_true: ...to here
cups-2.4.16/backend/failover.c:446:35: acquire_memory: allocated here
cups-2.4.16/backend/failover.c:446:7: danger: ‘strdup(tmp)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  444|       do
#  445|       {
#  446|->       cupsArrayAdd(printer_array, strdup(tmp));
#  447|       } while ((tmp = strtok(NULL,",")) != NULL);
#  448|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
cups-2.4.16/backend/failover.c:446:7: warning[-Wanalyzer-malloc-leak]: leak of ‘tok_tmp’
cups-2.4.16/backend/failover.c:425:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/failover.c:435:3: branch_false: ...to here
cups-2.4.16/backend/failover.c:437:6: branch_true: following ‘true’ branch...
cups-2.4.16/backend/failover.c:439:5: branch_true: ...to here
cups-2.4.16/backend/failover.c:441:15: acquire_memory: allocated here
cups-2.4.16/backend/failover.c:446:7: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/backend/failover.c:446:7: danger: ‘tok_tmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  444|       do
#  445|       {
#  446|->       cupsArrayAdd(printer_array, strdup(tmp));
#  447|       } while ((tmp = strtok(NULL,",")) != NULL);
#  448|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def12]
cups-2.4.16/backend/failover.c:446:35: warning[-Wanalyzer-null-argument]: use of NULL ‘tmp’ where non-null expected
cups-2.4.16/backend/failover.c:425:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/failover.c:435:3: branch_false: ...to here
cups-2.4.16/backend/failover.c:437:6: branch_true: following ‘true’ branch...
cups-2.4.16/backend/failover.c:439:5: branch_true: ...to here
cups-2.4.16/backend/failover.c:446:35: danger: argument 1 (‘tmp’) NULL where non-null expected
#  444|       do
#  445|       {
#  446|->       cupsArrayAdd(printer_array, strdup(tmp));
#  447|       } while ((tmp = strtok(NULL,",")) != NULL);
#  448|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def13]
cups-2.4.16/backend/lpd.c:513:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:163:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/lpd.c:169:12: branch_false: ...to here
cups-2.4.16/backend/lpd.c:169:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:177:17: branch_false: ...to here
cups-2.4.16/backend/lpd.c:235:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/lpd.c:407:14: branch_false: ...to here
cups-2.4.16/backend/lpd.c:413:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/lpd.c:414:29: branch_true: ...to here
cups-2.4.16/backend/lpd.c:437:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:457:11: branch_false: ...to here
cups-2.4.16/backend/lpd.c:457:11: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/lpd.c:467:16: branch_false: ...to here
cups-2.4.16/backend/lpd.c:467:16: acquire_resource: opened here
cups-2.4.16/backend/lpd.c:469:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:480:3: branch_false: ...to here
cups-2.4.16/backend/lpd.c:482:6: branch_true: following ‘true’ branch (when ‘sanitize_title != 0’)...
cups-2.4.16/backend/lpd.c:482:6: branch_true: ...to here
cups-2.4.16/backend/lpd.c:500:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.16/backend/lpd.c:502:8: branch_true: ...to here
cups-2.4.16/backend/lpd.c:502:8: branch_true: following ‘true’ branch (when ‘manual_copies != 0’)...
cups-2.4.16/backend/lpd.c:504:23: branch_true: ...to here
cups-2.4.16/backend/lpd.c:513:14: throw: if ‘cupsGetOption’ throws an exception...
cups-2.4.16/backend/lpd.c:513:14: danger: ‘fd’ leaks here; was opened at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#  511|       }
#  512|   
#  513|->     status = lpd_queue(hostname, addrlist, resource + 1, fd, snmp_fd, mode,
#  514|                          username, title, copies, banner, format, order, reserve,
#  515|   		       manual_copies, timeout, contimeout,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
cups-2.4.16/backend/lpd.c:587:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:567:13: acquire_resource: stream socket created here
cups-2.4.16/backend/lpd.c:567:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/backend/lpd.c:574:3: branch_false: ...to here
cups-2.4.16/backend/lpd.c:581:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/lpd.c:587:5: branch_true: ...to here
cups-2.4.16/backend/lpd.c:587:5: throw: if ‘_httpAddrSetPort’ throws an exception...
cups-2.4.16/backend/lpd.c:587:5: danger: ‘fd’ leaks here
#  585|       */
#  586|   
#  587|->     _httpAddrSetPort(&addr, *port);
#  588|   
#  589|      /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def15]
cups-2.4.16/backend/lpd.c:593:56: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:567:13: acquire_resource: stream socket created here
cups-2.4.16/backend/lpd.c:567:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/backend/lpd.c:574:3: branch_false: ...to here
cups-2.4.16/backend/lpd.c:581:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/lpd.c:587:5: branch_true: ...to here
cups-2.4.16/backend/lpd.c:593:56: throw: if ‘httpAddrLength’ throws an exception...
cups-2.4.16/backend/lpd.c:593:56: danger: ‘fd’ leaks here
#  591|       */
#  592|   
#  593|->     if (!bind(fd, (struct sockaddr *)&addr, (socklen_t)httpAddrLength(&addr)))
#  594|         return (fd);
#  595|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
cups-2.4.16/backend/lpd.c:622:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:567:13: acquire_resource: stream socket created here
cups-2.4.16/backend/lpd.c:567:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/backend/lpd.c:574:3: branch_false: ...to here
cups-2.4.16/backend/lpd.c:581:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:622:3: branch_false: ...to here
cups-2.4.16/backend/lpd.c:622:3: throw: if ‘close’ throws an exception...
cups-2.4.16/backend/lpd.c:622:3: danger: ‘fd’ leaks here
#  620|     closesocket(fd);
#  621|   #else
#  622|->   close(fd);
#  623|   #endif /* _WIN32 */
#  624|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def17]
cups-2.4.16/backend/lpd.c:754:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:94:1: enter_function: entry to ‘main’
cups-2.4.16/backend/lpd.c:163:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/lpd.c:169:12: branch_false: ...to here
cups-2.4.16/backend/lpd.c:169:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:177:17: branch_false: ...to here
cups-2.4.16/backend/lpd.c:235:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/lpd.c:407:14: branch_false: ...to here
cups-2.4.16/backend/lpd.c:413:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/lpd.c:414:29: branch_true: ...to here
cups-2.4.16/backend/lpd.c:437:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:457:11: branch_false: ...to here
cups-2.4.16/backend/lpd.c:457:11: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/lpd.c:467:16: branch_false: ...to here
cups-2.4.16/backend/lpd.c:467:16: acquire_resource: opened here
cups-2.4.16/backend/lpd.c:469:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:480:3: branch_false: ...to here
cups-2.4.16/backend/lpd.c:482:6: branch_true: following ‘true’ branch (when ‘sanitize_title != 0’)...
cups-2.4.16/backend/lpd.c:482:6: branch_true: ...to here
cups-2.4.16/backend/lpd.c:500:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.16/backend/lpd.c:502:8: branch_true: ...to here
cups-2.4.16/backend/lpd.c:502:8: branch_true: following ‘true’ branch (when ‘manual_copies != 0’)...
cups-2.4.16/backend/lpd.c:504:23: branch_true: ...to here
cups-2.4.16/backend/lpd.c:513:14: call_function: calling ‘lpd_queue’ from ‘main’
#  752|       */
#  753|   
#  754|->     fprintf(stderr, "DEBUG: Connecting to %s:%d for printer %s\n", hostname,
#  755|               httpAddrPort(&(addrlist->addr)), printer);
#  756|       _cupsLangPrintFilter(stderr, "INFO", _("Connecting to printer."));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def18]
cups-2.4.16/backend/lpd.c:756:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:94:1: enter_function: entry to ‘main’
cups-2.4.16/backend/lpd.c:163:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/lpd.c:169:12: branch_false: ...to here
cups-2.4.16/backend/lpd.c:169:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:177:17: branch_false: ...to here
cups-2.4.16/backend/lpd.c:235:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/lpd.c:407:14: branch_false: ...to here
cups-2.4.16/backend/lpd.c:413:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/lpd.c:414:29: branch_true: ...to here
cups-2.4.16/backend/lpd.c:437:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:457:11: branch_false: ...to here
cups-2.4.16/backend/lpd.c:457:11: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/lpd.c:467:16: branch_false: ...to here
cups-2.4.16/backend/lpd.c:467:16: acquire_resource: opened here
cups-2.4.16/backend/lpd.c:469:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:480:3: branch_false: ...to here
cups-2.4.16/backend/lpd.c:482:6: branch_true: following ‘true’ branch (when ‘sanitize_title != 0’)...
cups-2.4.16/backend/lpd.c:482:6: branch_true: ...to here
cups-2.4.16/backend/lpd.c:500:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.16/backend/lpd.c:502:8: branch_true: ...to here
cups-2.4.16/backend/lpd.c:502:8: branch_true: following ‘true’ branch (when ‘manual_copies != 0’)...
cups-2.4.16/backend/lpd.c:504:23: branch_true: ...to here
cups-2.4.16/backend/lpd.c:513:14: call_function: calling ‘lpd_queue’ from ‘main’
#  754|       fprintf(stderr, "DEBUG: Connecting to %s:%d for printer %s\n", hostname,
#  755|               httpAddrPort(&(addrlist->addr)), printer);
#  756|->     _cupsLangPrintFilter(stderr, "INFO", _("Connecting to printer."));
#  757|   
#  758|       for (lport = reserve == RESERVE_RFC1179 ? 732 : 1024, addr = addrlist,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
cups-2.4.16/backend/lpd.c:833:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:748:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/lpd.c:754:5: branch_true: ...to here
cups-2.4.16/backend/lpd.c:766:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:773:10: branch_false: ...to here
cups-2.4.16/backend/lpd.c:773:10: branch_false: following ‘false’ branch (when ‘addr’ is non-NULL)...
cups-2.4.16/backend/lpd.c:776:7: branch_false: ...to here
cups-2.4.16/backend/lpd.c:793:19: acquire_resource: stream socket created here
cups-2.4.16/backend/lpd.c:793:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/backend/lpd.c:801:9: branch_false: ...to here
cups-2.4.16/backend/lpd.c:826:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:833:70: branch_false: ...to here
cups-2.4.16/backend/lpd.c:833:12: throw: if ‘connect’ throws an exception...
cups-2.4.16/backend/lpd.c:833:12: danger: ‘fd’ leaks here
#  831|         }
#  832|   
#  833|->       if (!connect(fd, &(addr->addr.addr), (socklen_t)httpAddrLength(&(addr->addr))))
#  834|   	break;
#  835|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def20]
cups-2.4.16/backend/lpd.c:833:55: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:748:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/lpd.c:754:5: branch_true: ...to here
cups-2.4.16/backend/lpd.c:766:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:773:10: branch_false: ...to here
cups-2.4.16/backend/lpd.c:773:10: branch_false: following ‘false’ branch (when ‘addr’ is non-NULL)...
cups-2.4.16/backend/lpd.c:776:7: branch_false: ...to here
cups-2.4.16/backend/lpd.c:793:19: acquire_resource: stream socket created here
cups-2.4.16/backend/lpd.c:793:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/backend/lpd.c:801:9: branch_false: ...to here
cups-2.4.16/backend/lpd.c:826:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:833:70: branch_false: ...to here
cups-2.4.16/backend/lpd.c:833:55: throw: if ‘httpAddrLength’ throws an exception...
cups-2.4.16/backend/lpd.c:833:55: danger: ‘fd’ leaks here
#  831|         }
#  832|   
#  833|->       if (!connect(fd, &(addr->addr.addr), (socklen_t)httpAddrLength(&(addr->addr))))
#  834|   	break;
#  835|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
cups-2.4.16/backend/lpd.c:935:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:94:1: enter_function: entry to ‘main’
cups-2.4.16/backend/lpd.c:163:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/lpd.c:169:12: branch_false: ...to here
cups-2.4.16/backend/lpd.c:169:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:177:17: branch_false: ...to here
cups-2.4.16/backend/lpd.c:235:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/lpd.c:407:14: branch_false: ...to here
cups-2.4.16/backend/lpd.c:413:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/lpd.c:414:29: branch_true: ...to here
cups-2.4.16/backend/lpd.c:437:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:457:11: branch_false: ...to here
cups-2.4.16/backend/lpd.c:457:11: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/lpd.c:467:16: branch_false: ...to here
cups-2.4.16/backend/lpd.c:467:16: acquire_resource: opened here
cups-2.4.16/backend/lpd.c:469:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:480:3: branch_false: ...to here
cups-2.4.16/backend/lpd.c:482:6: branch_true: following ‘true’ branch (when ‘sanitize_title != 0’)...
cups-2.4.16/backend/lpd.c:482:6: branch_true: ...to here
cups-2.4.16/backend/lpd.c:500:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.16/backend/lpd.c:502:8: branch_true: ...to here
cups-2.4.16/backend/lpd.c:502:8: branch_true: following ‘true’ branch (when ‘manual_copies != 0’)...
cups-2.4.16/backend/lpd.c:504:23: branch_true: ...to here
cups-2.4.16/backend/lpd.c:513:14: call_function: calling ‘lpd_queue’ from ‘main’
#  933|   
#  934|       fputs("STATE: -connecting-to-device\n", stderr);
#  935|->     _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer."));
#  936|   
#  937|       fprintf(stderr, "DEBUG: Connected to %s:%d (local port %d)...\n",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def22]
cups-2.4.16/backend/lpd.c:937:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:94:1: enter_function: entry to ‘main’
cups-2.4.16/backend/lpd.c:163:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/lpd.c:169:12: branch_false: ...to here
cups-2.4.16/backend/lpd.c:169:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:177:17: branch_false: ...to here
cups-2.4.16/backend/lpd.c:235:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/lpd.c:407:14: branch_false: ...to here
cups-2.4.16/backend/lpd.c:413:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/lpd.c:414:29: branch_true: ...to here
cups-2.4.16/backend/lpd.c:437:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:457:11: branch_false: ...to here
cups-2.4.16/backend/lpd.c:457:11: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/lpd.c:467:16: branch_false: ...to here
cups-2.4.16/backend/lpd.c:467:16: acquire_resource: opened here
cups-2.4.16/backend/lpd.c:469:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:480:3: branch_false: ...to here
cups-2.4.16/backend/lpd.c:482:6: branch_true: following ‘true’ branch (when ‘sanitize_title != 0’)...
cups-2.4.16/backend/lpd.c:482:6: branch_true: ...to here
cups-2.4.16/backend/lpd.c:500:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.16/backend/lpd.c:502:8: branch_true: ...to here
cups-2.4.16/backend/lpd.c:502:8: branch_true: following ‘true’ branch (when ‘manual_copies != 0’)...
cups-2.4.16/backend/lpd.c:504:23: branch_true: ...to here
cups-2.4.16/backend/lpd.c:513:14: call_function: calling ‘lpd_queue’ from ‘main’
#  935|       _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer."));
#  936|   
#  937|->     fprintf(stderr, "DEBUG: Connected to %s:%d (local port %d)...\n",
#  938|   	    httpAddrString(&(addr->addr), addrname, sizeof(addrname)),
#  939|   	    httpAddrPort(&(addr->addr)), lport);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
cups-2.4.16/backend/lpd.c:946:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/lpd.c:94:1: enter_function: entry to ‘main’
cups-2.4.16/backend/lpd.c:163:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/lpd.c:169:12: branch_false: ...to here
cups-2.4.16/backend/lpd.c:169:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:177:17: branch_false: ...to here
cups-2.4.16/backend/lpd.c:235:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/lpd.c:407:14: branch_false: ...to here
cups-2.4.16/backend/lpd.c:413:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/lpd.c:414:29: branch_true: ...to here
cups-2.4.16/backend/lpd.c:437:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:457:11: branch_false: ...to here
cups-2.4.16/backend/lpd.c:457:11: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/lpd.c:467:16: branch_false: ...to here
cups-2.4.16/backend/lpd.c:467:16: acquire_resource: opened here
cups-2.4.16/backend/lpd.c:469:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/lpd.c:480:3: branch_false: ...to here
cups-2.4.16/backend/lpd.c:482:6: branch_true: following ‘true’ branch (when ‘sanitize_title != 0’)...
cups-2.4.16/backend/lpd.c:482:6: branch_true: ...to here
cups-2.4.16/backend/lpd.c:500:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.16/backend/lpd.c:502:8: branch_true: ...to here
cups-2.4.16/backend/lpd.c:502:8: branch_true: following ‘true’ branch (when ‘manual_copies != 0’)...
cups-2.4.16/backend/lpd.c:504:23: branch_true: ...to here
cups-2.4.16/backend/lpd.c:513:14: call_function: calling ‘lpd_queue’ from ‘main’
#  944|   
#  945|       if (snmp_fd >= 0)
#  946|->       have_supplies = !backendSNMPSupplies(snmp_fd, &(addrlist->addr), NULL,
#  947|                                              NULL);
#  948|       else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
cups-2.4.16/backend/snmp.c:321:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/backend/snmp.c:1165:1: enter_function: entry to ‘scan_devices’
cups-2.4.16/backend/snmp.c:1245:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
cups-2.4.16/backend/snmp.c:1245:3: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1247:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/snmp.c:1249:5: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1253:8: branch_false: following ‘false’ branch (when ‘ipv6 < 0’)...
cups-2.4.16/backend/snmp.c:1256:5: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1257:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/snmp.c:1266:9: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1266:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/snmp.c:1268:7: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1268:7: call_function: calling ‘read_snmp_response’ from ‘scan_devices’
#  319|       temp->make_and_model = strdup(make_and_model);
#  320|   
#  321|->   cupsArrayAdd(Devices, temp);
#  322|   
#  323|     if (uri)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
cups-2.4.16/backend/snmp.c:321:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/backend/snmp.c:1165:1: enter_function: entry to ‘scan_devices’
cups-2.4.16/backend/snmp.c:1245:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
cups-2.4.16/backend/snmp.c:1245:3: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1247:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/snmp.c:1249:5: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1253:8: branch_false: following ‘false’ branch (when ‘ipv6 < 0’)...
cups-2.4.16/backend/snmp.c:1256:5: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1257:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/snmp.c:1266:9: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1266:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/snmp.c:1268:7: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1268:7: call_function: calling ‘read_snmp_response’ from ‘scan_devices’
#  319|       temp->make_and_model = strdup(make_and_model);
#  320|   
#  321|->   cupsArrayAdd(Devices, temp);
#  322|   
#  323|     if (uri)

Error: CPPCHECK_WARNING (CWE-252): [#def26]
cups-2.4.16/backend/snmp.c:797: error[leakReturnValNotUsed]: Return value of allocation function 'add_array' is not stored.
#  795|   
#  796|     if (address)
#  797|->     add_array(Addresses, address);
#  798|   
#  799|     if ((debug = getenv("CUPS_DEBUG_LEVEL")) != NULL)

Error: CPPCHECK_WARNING (CWE-252): [#def27]
cups-2.4.16/backend/snmp.c:830: error[leakReturnValNotUsed]: Return value of allocation function 'add_array' is not stored.
#  828|         {
#  829|           if (!address)
#  830|->           add_array(Addresses, value);
#  831|         }
#  832|         else if (!_cups_strcasecmp(line, "Community"))

Error: CPPCHECK_WARNING (CWE-252): [#def28]
cups-2.4.16/backend/snmp.c:833: error[leakReturnValNotUsed]: Return value of allocation function 'add_array' is not stored.
#  831|         }
#  832|         else if (!_cups_strcasecmp(line, "Community"))
#  833|->         add_array(Communities, value);
#  834|         else if (!_cups_strcasecmp(line, "DebugLevel"))
#  835|           DebugLevel = atoi(value);

Error: CPPCHECK_WARNING (CWE-252): [#def29]
cups-2.4.16/backend/snmp.c:879: error[leakReturnValNotUsed]: Return value of allocation function 'add_array' is not stored.
#  877|     {
#  878|       fputs("INFO: Using default SNMP Community public\n", stderr);
#  879|->     add_array(Communities, "public");
#  880|     }
#  881|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
cups-2.4.16/backend/snmp.c:1212:30: warning[-Wanalyzer-malloc-leak]: leak of ‘addrs’
cups-2.4.16/backend/snmp.c:1165:1: enter_function: entry to ‘scan_devices’
cups-2.4.16/backend/snmp.c:1188:8: branch_true: following ‘true’ branch (when ‘address’ is non-NULL)...
cups-2.4.16/backend/snmp.c:1191:10: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1191:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/backend/snmp.c:1192:15: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1192:15: call_function: calling ‘get_interface_addresses’ from ‘scan_devices’
cups-2.4.16/backend/snmp.c:1192:15: return_function: returning to ‘scan_devices’ from ‘get_interface_addresses’
cups-2.4.16/backend/snmp.c:1206:8: branch_false: following ‘false’ branch (when ‘addrs’ is non-NULL)...
cups-2.4.16/backend/snmp.c:1212:30: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1212:30: throw: if ‘cupsArrayFirst’ throws an exception...
cups-2.4.16/backend/snmp.c:1212:30: danger: ‘addrs’ leaks here; was allocated at [(16)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/15)
# 1210|       }
# 1211|   
# 1212|->     for (community = (char *)cupsArrayFirst(Communities);
# 1213|            community;
# 1214|   	 community = (char *)cupsArrayNext(Communities))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
cups-2.4.16/backend/snmp.c:1222:13: warning[-Wanalyzer-malloc-leak]: leak of ‘addrs’
cups-2.4.16/backend/snmp.c:1165:1: enter_function: entry to ‘scan_devices’
cups-2.4.16/backend/snmp.c:1188:8: branch_true: following ‘true’ branch (when ‘address’ is non-NULL)...
cups-2.4.16/backend/snmp.c:1191:10: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1191:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/backend/snmp.c:1192:15: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1192:15: call_function: calling ‘get_interface_addresses’ from ‘scan_devices’
cups-2.4.16/backend/snmp.c:1192:15: return_function: returning to ‘scan_devices’ from ‘get_interface_addresses’
cups-2.4.16/backend/snmp.c:1206:8: branch_false: following ‘false’ branch (when ‘addrs’ is non-NULL)...
cups-2.4.16/backend/snmp.c:1212:30: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1213:10: branch_true: following ‘true’ branch (when ‘community’ is non-NULL)...
cups-2.4.16/backend/snmp.c:1216:7: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1219:26: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
cups-2.4.16/backend/snmp.c:1222:13: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1222:13: throw: if ‘httpAddrFamily’ throws an exception...
cups-2.4.16/backend/snmp.c:1222:13: danger: ‘addrs’ leaks here; was allocated at [(16)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/15)
# 1220|         {
# 1221|   #ifdef AF_INET6
# 1222|->         if (httpAddrFamily(&(addr->addr)) == AF_INET6)
# 1223|   	  fd = ipv6;
# 1224|   	else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
cups-2.4.16/backend/snmp.c:1236:5: warning[-Wanalyzer-malloc-leak]: leak of ‘addrs’
cups-2.4.16/backend/snmp.c:1165:1: enter_function: entry to ‘scan_devices’
cups-2.4.16/backend/snmp.c:1188:8: branch_true: following ‘true’ branch (when ‘address’ is non-NULL)...
cups-2.4.16/backend/snmp.c:1191:10: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1191:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/backend/snmp.c:1192:15: branch_true: ...to here
cups-2.4.16/backend/snmp.c:1192:15: call_function: calling ‘get_interface_addresses’ from ‘scan_devices’
cups-2.4.16/backend/snmp.c:1192:15: return_function: returning to ‘scan_devices’ from ‘get_interface_addresses’
cups-2.4.16/backend/snmp.c:1206:8: branch_false: following ‘false’ branch (when ‘addrs’ is non-NULL)...
cups-2.4.16/backend/snmp.c:1212:30: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1213:10: branch_false: following ‘false’ branch (when ‘community’ is NULL)...
cups-2.4.16/backend/snmp.c:1236:5: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1236:5: throw: if ‘httpAddrFreeList’ throws an exception...
cups-2.4.16/backend/snmp.c:1236:5: danger: ‘addrs’ leaks here; was allocated at [(16)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/15)
# 1234|       }
# 1235|   
# 1236|->     httpAddrFreeList(addrs);
# 1237|     }
# 1238|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def33]
cups-2.4.16/backend/snmp.c:1331:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/snmp.c:1324:13: acquire_resource: stream socket created here
cups-2.4.16/backend/snmp.c:1324:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/backend/snmp.c:1331:3: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1331:3: throw: if ‘_httpAddrSetPort’ throws an exception...
cups-2.4.16/backend/snmp.c:1331:3: danger: ‘fd’ leaks here
# 1329|     }
# 1330|   
# 1331|->   _httpAddrSetPort(addr, port);
# 1332|   
# 1333|     alarm(1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def34]
cups-2.4.16/backend/snmp.c:1335:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/snmp.c:1324:13: acquire_resource: stream socket created here
cups-2.4.16/backend/snmp.c:1324:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/backend/snmp.c:1331:3: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1335:12: throw: if ‘connect’ throws an exception...
cups-2.4.16/backend/snmp.c:1335:12: danger: ‘fd’ leaks here
# 1333|     alarm(1);
# 1334|   
# 1335|->   status = connect(fd, (void *)addr, (socklen_t)httpAddrLength(addr));
# 1336|   
# 1337|     close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def35]
cups-2.4.16/backend/snmp.c:1335:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/backend/snmp.c:1324:13: acquire_resource: stream socket created here
cups-2.4.16/backend/snmp.c:1324:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/backend/snmp.c:1331:3: branch_false: ...to here
cups-2.4.16/backend/snmp.c:1335:49: throw: if ‘httpAddrLength’ throws an exception...
cups-2.4.16/backend/snmp.c:1335:49: danger: ‘fd’ leaks here
# 1333|     alarm(1);
# 1334|   
# 1335|->   status = connect(fd, (void *)addr, (socklen_t)httpAddrLength(addr));
# 1336|   
# 1337|     close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def36]
cups-2.4.16/backend/socket.c:154:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:154:24: throw: if ‘cupsBackendDeviceURI’ throws an exception...
cups-2.4.16/backend/socket.c:154:24: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  152|     */
#  153|   
#  154|->   while ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
#  155|     {
#  156|       _cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer."));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def37]
cups-2.4.16/backend/socket.c:156:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:154:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:156:5: branch_true: ...to here
cups-2.4.16/backend/socket.c:156:5: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/backend/socket.c:156:5: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  154|     while ((device_uri = cupsBackendDeviceURI(argv)) == NULL)
#  155|     {
#  156|->     _cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer."));
#  157|       sleep(10);
#  158|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def38]
cups-2.4.16/backend/socket.c:157:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:154:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:156:5: branch_true: ...to here
cups-2.4.16/backend/socket.c:157:5: throw: if ‘sleep’ throws an exception...
cups-2.4.16/backend/socket.c:157:5: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  155|     {
#  156|       _cupsLangPrintFilter(stderr, "INFO", _("Unable to locate printer."));
#  157|->     sleep(10);
#  158|   
#  159|       if (getenv("CLASS") != NULL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def39]
cups-2.4.16/backend/socket.c:163:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:163:3: throw: if ‘httpSeparateURI’ throws an exception...
cups-2.4.16/backend/socket.c:163:3: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  161|     }
#  162|   
#  163|->   httpSeparateURI(HTTP_URI_CODING_ALL, device_uri, scheme, sizeof(scheme),
#  164|                     username, sizeof(username), hostname, sizeof(hostname), &port,
#  165|   		  resource, sizeof(resource));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def40]
cups-2.4.16/backend/socket.c:225:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.16/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.16/backend/socket.c:190:12: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:190:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:204:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:204:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:225:12: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/backend/socket.c:225:12: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  223|         */
#  224|   
#  225|->       if (!_cups_strcasecmp(name, "waiteof"))
#  226|         {
#  227|          /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
cups-2.4.16/backend/socket.c:231:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.16/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.16/backend/socket.c:190:12: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:190:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:204:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:204:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:225:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:231:20: branch_true: ...to here
cups-2.4.16/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:231:33: branch_false: ...to here
cups-2.4.16/backend/socket.c:231:33: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/backend/socket.c:231:33: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  229|   	*/
#  230|   
#  231|->         waiteof = !value[0] || !_cups_strcasecmp(value, "on") ||
#  232|   		  !_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true");
#  233|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
cups-2.4.16/backend/socket.c:232:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.16/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.16/backend/socket.c:190:12: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:190:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:204:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:204:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:225:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:231:20: branch_true: ...to here
cups-2.4.16/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:231:33: branch_false: ...to here
cups-2.4.16/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:232:20: branch_false: ...to here
cups-2.4.16/backend/socket.c:232:20: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/backend/socket.c:232:20: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  230|   
#  231|           waiteof = !value[0] || !_cups_strcasecmp(value, "on") ||
#  232|-> 		  !_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true");
#  233|         }
#  234|         else if (!_cups_strcasecmp(name, "snmp"))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
cups-2.4.16/backend/socket.c:232:55: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.16/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.16/backend/socket.c:190:12: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:190:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:204:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:204:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:225:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:231:20: branch_true: ...to here
cups-2.4.16/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:231:33: branch_false: ...to here
cups-2.4.16/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:232:20: branch_false: ...to here
cups-2.4.16/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:232:55: branch_false: ...to here
cups-2.4.16/backend/socket.c:232:55: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/backend/socket.c:232:55: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  230|   
#  231|           waiteof = !value[0] || !_cups_strcasecmp(value, "on") ||
#  232|-> 		  !_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true");
#  233|         }
#  234|         else if (!_cups_strcasecmp(name, "snmp"))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
cups-2.4.16/backend/socket.c:234:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.16/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.16/backend/socket.c:190:12: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:190:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:204:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:204:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:225:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:234:17: branch_false: ...to here
cups-2.4.16/backend/socket.c:234:17: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/backend/socket.c:234:17: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  232|   		  !_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true");
#  233|         }
#  234|->       else if (!_cups_strcasecmp(name, "snmp"))
#  235|         {
#  236|           /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
cups-2.4.16/backend/socket.c:240:39: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.16/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.16/backend/socket.c:190:12: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:190:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:204:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:204:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:225:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:234:17: branch_false: ...to here
cups-2.4.16/backend/socket.c:234:15: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:240:26: branch_true: ...to here
cups-2.4.16/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:240:39: branch_false: ...to here
cups-2.4.16/backend/socket.c:240:39: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/backend/socket.c:240:39: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  238|            */
#  239|   
#  240|->          snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
#  241|                           !_cups_strcasecmp(value, "yes") ||
#  242|                           !_cups_strcasecmp(value, "true");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
cups-2.4.16/backend/socket.c:241:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.16/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.16/backend/socket.c:190:12: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:190:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:204:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:204:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:225:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:234:17: branch_false: ...to here
cups-2.4.16/backend/socket.c:234:15: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:240:26: branch_true: ...to here
cups-2.4.16/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:240:39: branch_false: ...to here
cups-2.4.16/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:241:26: branch_false: ...to here
cups-2.4.16/backend/socket.c:241:26: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/backend/socket.c:241:26: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  239|   
#  240|            snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
#  241|->                         !_cups_strcasecmp(value, "yes") ||
#  242|                           !_cups_strcasecmp(value, "true");
#  243|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
cups-2.4.16/backend/socket.c:242:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.16/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.16/backend/socket.c:190:12: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:190:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:204:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:204:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:225:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:234:17: branch_false: ...to here
cups-2.4.16/backend/socket.c:234:15: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:240:26: branch_true: ...to here
cups-2.4.16/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:240:39: branch_false: ...to here
cups-2.4.16/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:241:26: branch_false: ...to here
cups-2.4.16/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:242:26: branch_false: ...to here
cups-2.4.16/backend/socket.c:242:26: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/backend/socket.c:242:26: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  240|            snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") ||
#  241|                           !_cups_strcasecmp(value, "yes") ||
#  242|->                         !_cups_strcasecmp(value, "true");
#  243|         }
#  244|         else if (!_cups_strcasecmp(name, "contimeout"))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
cups-2.4.16/backend/socket.c:244:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.16/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.16/backend/socket.c:190:12: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:190:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:204:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:204:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:225:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:234:17: branch_false: ...to here
cups-2.4.16/backend/socket.c:234:15: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:244:17: branch_false: ...to here
cups-2.4.16/backend/socket.c:244:17: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/backend/socket.c:244:17: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  242|                           !_cups_strcasecmp(value, "true");
#  243|         }
#  244|->       else if (!_cups_strcasecmp(name, "contimeout"))
#  245|         {
#  246|          /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
cups-2.4.16/backend/socket.c:262:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:262:14: throw: if ‘backendLookup’ throws an exception...
cups-2.4.16/backend/socket.c:262:14: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
#  260|     start_time = time(NULL);
#  261|   
#  262|->   addrlist = backendLookup(hostname, port, NULL);
#  263|   
#  264|    /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
cups-2.4.16/backend/socket.c:269:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:269:15: throw: if ‘_cupsSNMPOpen’ throws an exception...
cups-2.4.16/backend/socket.c:269:15: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
#  267|   
#  268|     if (snmp_enabled)
#  269|->     snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family);
#  270|     else
#  271|       snmp_fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
cups-2.4.16/backend/socket.c:274:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:274:22: branch_true: ...to here
cups-2.4.16/backend/socket.c:274:22: throw: if ‘backendSNMPSupplies’ throws an exception...
cups-2.4.16/backend/socket.c:274:22: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
#  272|   
#  273|     if (snmp_fd >= 0)
#  274|->     have_supplies = !backendSNMPSupplies(snmp_fd, &(addrlist->addr),
#  275|                                            &start_count, NULL);
#  276|     else

Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
cups-2.4.16/backend/socket.c:285:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:283:6: branch_true: following ‘true’ branch (when ‘print_fd == 0’)...
cups-2.4.16/backend/socket.c:285:10: branch_true: ...to here
cups-2.4.16/backend/socket.c:285:10: throw: if ‘backendWaitLoop’ throws an exception...
cups-2.4.16/backend/socket.c:285:10: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
#  283|     if (print_fd == 0)
#  284|     {
#  285|->     if (!backendWaitLoop(snmp_fd, &(addrlist->addr), 1, backendNetworkSideCB))
#  286|         return (CUPS_BACKEND_OK);
#  287|       else if ((bytes = read(0, buffer, sizeof(buffer))) <= 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
cups-2.4.16/backend/socket.c:296:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:296:3: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/backend/socket.c:296:3: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
#  294|   
#  295|     fprintf(stderr, "DEBUG: Connecting to %s:%d\n", hostname, port);
#  296|->   _cupsLangPrintFilter(stderr, "INFO", _("Connecting to printer."));
#  297|   
#  298|     for (delay = 5;;)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
cups-2.4.16/backend/socket.c:300:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:17: throw: if ‘httpAddrConnect’ throws an exception...
cups-2.4.16/backend/socket.c:300:17: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
#  298|     for (delay = 5;;)
#  299|     {
#  300|->     if ((addr = httpAddrConnect(addrlist, &device_fd)) == NULL)
#  301|       {
#  302|         error     = errno;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
cups-2.4.16/backend/socket.c:314:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:302:19: branch_true: ...to here
cups-2.4.16/backend/socket.c:305:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:314:9: branch_true: ...to here
cups-2.4.16/backend/socket.c:314:9: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/backend/socket.c:314:9: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/6)
#  312|   	*/
#  313|   
#  314|->         _cupsLangPrintFilter(stderr, "INFO",
#  315|   			     _("Unable to contact printer, queuing on next "
#  316|   			       "printer in class."));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def56]
cups-2.4.16/backend/socket.c:322:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:302:19: branch_true: ...to here
cups-2.4.16/backend/socket.c:305:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:314:9: branch_true: ...to here
cups-2.4.16/backend/socket.c:322:9: throw: if ‘sleep’ throws an exception...
cups-2.4.16/backend/socket.c:322:9: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/6)
#  320|   	*/
#  321|   
#  322|-> 	sleep(5);
#  323|   
#  324|           return (CUPS_BACKEND_FAILED);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
cups-2.4.16/backend/socket.c:333:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:302:19: branch_true: ...to here
cups-2.4.16/backend/socket.c:305:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:327:7: branch_false: ...to here
cups-2.4.16/backend/socket.c:329:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:331:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:331:12: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:333:11: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/backend/socket.c:333:11: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/6)
#  331|           if (contimeout && (time(NULL) - start_time) > contimeout)
#  332|   	{
#  333|-> 	  _cupsLangPrintFilter(stderr, "ERROR",
#  334|   	                       _("The printer is not responding."));
#  335|   	  return (CUPS_BACKEND_FAILED);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
cups-2.4.16/backend/socket.c:341:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:302:19: branch_true: ...to here
cups-2.4.16/backend/socket.c:305:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:327:7: branch_false: ...to here
cups-2.4.16/backend/socket.c:329:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:331:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:331:12: branch_true: following ‘true’ branch (when ‘contimeout != 0’)...
cups-2.4.16/backend/socket.c:331:28: branch_true: ...to here
cups-2.4.16/backend/socket.c:331:13: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:338:9: branch_false: ...to here
cups-2.4.16/backend/socket.c:341:15: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/backend/socket.c:341:15: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/6)
#  339|   	{
#  340|   	  case EHOSTDOWN :
#  341|-> 	      _cupsLangPrintFilter(stderr, "WARNING",
#  342|   				   _("The printer may not exist or "
#  343|   				     "is unavailable at this time."));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
cups-2.4.16/backend/socket.c:348:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:302:19: branch_true: ...to here
cups-2.4.16/backend/socket.c:305:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:327:7: branch_false: ...to here
cups-2.4.16/backend/socket.c:329:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:331:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:331:12: branch_true: following ‘true’ branch (when ‘contimeout != 0’)...
cups-2.4.16/backend/socket.c:331:28: branch_true: ...to here
cups-2.4.16/backend/socket.c:331:13: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:338:9: branch_false: ...to here
cups-2.4.16/backend/socket.c:348:15: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/backend/socket.c:348:15: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/6)
#  346|   	  case EHOSTUNREACH :
#  347|   	  default :
#  348|-> 	      _cupsLangPrintFilter(stderr, "WARNING",
#  349|   				   _("The printer is unreachable at this "
#  350|   				     "time."));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
cups-2.4.16/backend/socket.c:354:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:302:19: branch_true: ...to here
cups-2.4.16/backend/socket.c:305:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:327:7: branch_false: ...to here
cups-2.4.16/backend/socket.c:329:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:331:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:331:12: branch_true: following ‘true’ branch (when ‘contimeout != 0’)...
cups-2.4.16/backend/socket.c:331:28: branch_true: ...to here
cups-2.4.16/backend/socket.c:331:13: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:338:9: branch_false: ...to here
cups-2.4.16/backend/socket.c:354:15: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/backend/socket.c:354:15: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/6)
#  352|   
#  353|   	  case ECONNREFUSED :
#  354|-> 	      _cupsLangPrintFilter(stderr, "WARNING",
#  355|   	                           _("The printer is in use."));
#  356|   	      break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
cups-2.4.16/backend/socket.c:359:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:302:19: branch_true: ...to here
cups-2.4.16/backend/socket.c:305:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:327:7: branch_false: ...to here
cups-2.4.16/backend/socket.c:329:10: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:331:12: branch_true: ...to here
cups-2.4.16/backend/socket.c:331:12: branch_true: following ‘true’ branch (when ‘contimeout != 0’)...
cups-2.4.16/backend/socket.c:331:28: branch_true: ...to here
cups-2.4.16/backend/socket.c:331:13: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:338:9: branch_false: ...to here
cups-2.4.16/backend/socket.c:359:9: throw: if ‘sleep’ throws an exception...
cups-2.4.16/backend/socket.c:359:9: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/6)
#  357|           }
#  358|   
#  359|-> 	sleep((unsigned)delay);
#  360|   
#  361|   	if (delay < 30)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
cups-2.4.16/backend/socket.c:366:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:302:19: branch_true: ...to here
cups-2.4.16/backend/socket.c:305:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:327:7: branch_false: ...to here
cups-2.4.16/backend/socket.c:329:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:366:9: branch_false: ...to here
cups-2.4.16/backend/socket.c:366:9: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/backend/socket.c:366:9: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/6)
#  364|         else
#  365|         {
#  366|-> 	_cupsLangPrintFilter(stderr, "ERROR",
#  367|   	                     _("The printer is not responding."));
#  368|   	sleep(30);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def63]
cups-2.4.16/backend/socket.c:368:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:302:19: branch_true: ...to here
cups-2.4.16/backend/socket.c:305:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:327:7: branch_false: ...to here
cups-2.4.16/backend/socket.c:329:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:366:9: branch_false: ...to here
cups-2.4.16/backend/socket.c:368:9: throw: if ‘sleep’ throws an exception...
cups-2.4.16/backend/socket.c:368:9: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/6)
#  366|   	_cupsLangPrintFilter(stderr, "ERROR",
#  367|   	                     _("The printer is not responding."));
#  368|-> 	sleep(30);
#  369|         }
#  370|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
cups-2.4.16/backend/socket.c:376:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:375:3: branch_false: ...to here
cups-2.4.16/backend/socket.c:376:3: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/backend/socket.c:376:3: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/6)
#  374|   
#  375|     fputs("STATE: -connecting-to-device\n", stderr);
#  376|->   _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer."));
#  377|   
#  378|     fprintf(stderr, "DEBUG: Connected to %s:%d...\n",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
cups-2.4.16/backend/socket.c:378:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:375:3: branch_false: ...to here
cups-2.4.16/backend/socket.c:378:3: throw: if ‘httpAddrPort’ throws an exception...
cups-2.4.16/backend/socket.c:378:3: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/6)
#  376|     _cupsLangPrintFilter(stderr, "INFO", _("Connected to printer."));
#  377|   
#  378|->   fprintf(stderr, "DEBUG: Connected to %s:%d...\n",
#  379|   	  httpAddrString(&(addr->addr), addrname, sizeof(addrname)),
#  380|   	  httpAddrPort(&(addr->addr)));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def66]
cups-2.4.16/backend/socket.c:389:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:285:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:287:23: branch_false: ...to here
cups-2.4.16/backend/socket.c:287:13: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:295:3: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:375:3: branch_false: ...to here
cups-2.4.16/backend/socket.c:388:6: branch_true: following ‘true’ branch (when ‘bytes != 0’)...
cups-2.4.16/backend/socket.c:389:15: branch_true: ...to here
cups-2.4.16/backend/socket.c:389:15: throw: if ‘write’ throws an exception...
cups-2.4.16/backend/socket.c:389:15: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/6)
#  387|   
#  388|     if (bytes > 0)
#  389|->     tbytes += write(device_fd, buffer, (size_t)bytes);
#  390|   
#  391|     while (copies > 0 && tbytes >= 0)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
cups-2.4.16/backend/socket.c:418:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:277:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:375:3: branch_false: ...to here
cups-2.4.16/backend/socket.c:391:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:410:3: branch_false: ...to here
cups-2.4.16/backend/socket.c:412:6: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:418:5: branch_true: ...to here
cups-2.4.16/backend/socket.c:418:5: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/backend/socket.c:418:5: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/6)
#  416|       */
#  417|   
#  418|->     _cupsLangPrintFilter(stderr, "INFO", _("Waiting for printer to finish."));
#  419|   
#  420|       shutdown(device_fd, 1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def68]
cups-2.4.16/backend/socket.c:430:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.16/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.16/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.16/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.16/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.16/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.16/backend/socket.c:177:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.16/backend/socket.c:260:16: branch_false: ...to here
cups-2.4.16/backend/socket.c:268:6: branch_true: following ‘true’ branch (when ‘snmp_enabled != 0’)...
cups-2.4.16/backend/socket.c:269:29: branch_true: ...to here
cups-2.4.16/backend/socket.c:273:6: branch_true: following ‘true’ branch...
cups-2.4.16/backend/socket.c:274:22: branch_true: ...to here
cups-2.4.16/backend/socket.c:285:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:287:23: branch_false: ...to here
cups-2.4.16/backend/socket.c:287:13: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:295:3: branch_false: ...to here
cups-2.4.16/backend/socket.c:300:8: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:375:3: branch_false: ...to here
cups-2.4.16/backend/socket.c:391:10: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:410:3: branch_false: ...to here
cups-2.4.16/backend/socket.c:412:6: branch_false: following ‘false’ branch...
cups-2.4.16/backend/socket.c:429:6: branch_false: ...to here
cups-2.4.16/backend/socket.c:429:6: branch_true: following ‘true’ branch (when ‘have_supplies != 0’)...
cups-2.4.16/backend/socket.c:430:8: branch_true: ...to here
cups-2.4.16/backend/socket.c:430:8: throw: if ‘backendSNMPSupplies’ throws an exception...
cups-2.4.16/backend/socket.c:430:8: danger: ‘print_fd’ leaks here; was opened at [(7)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/6)
#  428|   
#  429|     if (have_supplies &&
#  430|->       !backendSNMPSupplies(snmp_fd, &(addrlist->addr), &page_count, NULL) &&
#  431|         page_count > start_count)
#  432|       fprintf(stderr, "PAGE: total %d\n", page_count - start_count);

Error: COMPILER_WARNING (CWE-704): [#def69]
cups-2.4.16/berkeley/lpq.c: scope_hint: In function ‘main’
cups-2.4.16/berkeley/lpq.c:130:29: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  130 |               if ((instance = strchr(dest, '/')) != NULL)
#      |                             ^
#  128|   	      }
#  129|   
#  130|-> 	      if ((instance = strchr(dest, '/')) != NULL)
#  131|   		*instance++ = '\0';
#  132|   

Error: COMPILER_WARNING (CWE-704): [#def70]
cups-2.4.16/berkeley/lpq.c:130:29: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  128|   	      }
#  129|   
#  130|-> 	      if ((instance = strchr(dest, '/')) != NULL)
#  131|   		*instance++ = '\0';
#  132|   

Error: COMPILER_WARNING (CWE-704): [#def71]
cups-2.4.16/berkeley/lprm.c: scope_hint: In function ‘main’
cups-2.4.16/berkeley/lprm.c:95:29: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   95 |               if ((instance = strchr(name, '/')) != NULL)
#      |                             ^
#   93|   	      }
#   94|   
#   95|-> 	      if ((instance = strchr(name, '/')) != NULL)
#   96|   		*instance = '\0';
#   97|   

Error: COMPILER_WARNING (CWE-704): [#def72]
cups-2.4.16/berkeley/lprm.c:95:29: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#   93|   	      }
#   94|   
#   95|-> 	      if ((instance = strchr(name, '/')) != NULL)
#   96|   		*instance = '\0';
#   97|   

Error: COMPILER_WARNING (CWE-704): [#def73]
cups-2.4.16/cgi-bin/admin.c: scope_hint: In function ‘do_am_printer’
cups-2.4.16/cgi-bin/admin.c:702:17: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  702 |     if ((uriptr = strrchr(var, '|')) != NULL)
#      |                 ^
#  700|     if ((var = cgiGetVariable("DEVICE_URI")) != NULL)
#  701|     {
#  702|->     if ((uriptr = strrchr(var, '|')) != NULL)
#  703|       {
#  704|        /*

Error: COMPILER_WARNING (CWE-704): [#def74]
cups-2.4.16/cgi-bin/admin.c:702:17: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  700|     if ((var = cgiGetVariable("DEVICE_URI")) != NULL)
#  701|     {
#  702|->     if ((uriptr = strrchr(var, '|')) != NULL)
#  703|       {
#  704|        /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def75]
cups-2.4.16/cgi-bin/admin.c:1704:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
cups-2.4.16/cgi-bin/admin.c:1248:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1522:12: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1648:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1661:9: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1661:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1681:18: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1681:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1702:37: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1702:19: acquire_memory: allocated here
cups-2.4.16/cgi-bin/admin.c:1702:8: branch_true: following ‘true’ branch (when ‘buffer’ is non-NULL)...
cups-2.4.16/cgi-bin/admin.c:1704:7: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1704:7: throw: if ‘cupsFileRead’ throws an exception...
cups-2.4.16/cgi-bin/admin.c:1704:7: danger: ‘buffer’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
# 1702|       if ((buffer = calloc(1, (size_t)info.st_size + 1)) != NULL)
# 1703|       {
# 1704|->       cupsFileRead(cupsd, buffer, (size_t)info.st_size);
# 1705|         cgiSetVariable("CUPSDCONF", buffer);
# 1706|         free(buffer);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
cups-2.4.16/cgi-bin/admin.c:1726:39: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
cups-2.4.16/cgi-bin/admin.c:1248:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1522:12: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1648:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1661:9: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1661:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1681:18: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1681:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1702:37: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1718:8: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/admin.c:1721:21: acquire_memory: allocated here
cups-2.4.16/cgi-bin/admin.c:1721:10: branch_true: following ‘true’ branch (when ‘buffer’ is non-NULL)...
cups-2.4.16/cgi-bin/admin.c:1723:44: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1726:14: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/admin.c:1728:14: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/admin.c:1730:13: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1726:14: branch_true: following ‘true’ branch (when ‘bufptr < bufend’)...
cups-2.4.16/cgi-bin/admin.c:1726:39: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1726:39: throw: if ‘cupsFileGetChar’ throws an exception...
cups-2.4.16/cgi-bin/admin.c:1726:39: danger: ‘buffer’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/10)
# 1724|   
# 1725|   	for (bufptr = buffer;
# 1726|-> 	     bufptr < bufend && (ch = cupsFileGetChar(cupsd)) != EOF;)
# 1727|   	{
# 1728|   	  if (ch == '\\' || ch == '\"')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def77]
cups-2.4.16/cgi-bin/admin.c:1726:39: warning[-Wanalyzer-malloc-leak]: leak of ‘bufptr’
cups-2.4.16/cgi-bin/admin.c:1248:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1522:12: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1648:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1661:9: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1661:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1681:18: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1681:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1702:37: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1718:8: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/admin.c:1721:21: acquire_memory: allocated here
cups-2.4.16/cgi-bin/admin.c:1721:10: branch_true: following ‘true’ branch (when ‘buffer’ is non-NULL)...
cups-2.4.16/cgi-bin/admin.c:1723:44: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1726:14: branch_true: following ‘true’ branch (when ‘bufptr < bufend’)...
cups-2.4.16/cgi-bin/admin.c:1726:39: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1726:39: throw: if ‘cupsFileGetChar’ throws an exception...
cups-2.4.16/cgi-bin/admin.c:1726:39: danger: ‘bufptr’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
# 1724|   
# 1725|   	for (bufptr = buffer;
# 1726|-> 	     bufptr < bufend && (ch = cupsFileGetChar(cupsd)) != EOF;)
# 1727|   	{
# 1728|   	  if (ch == '\\' || ch == '\"')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def78]
cups-2.4.16/cgi-bin/admin.c:1749:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
cups-2.4.16/cgi-bin/admin.c:1248:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1522:12: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1648:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1661:9: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1661:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1681:18: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1681:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1702:37: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1718:8: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/admin.c:1721:21: acquire_memory: allocated here
cups-2.4.16/cgi-bin/admin.c:1721:10: branch_true: following ‘true’ branch (when ‘buffer’ is non-NULL)...
cups-2.4.16/cgi-bin/admin.c:1723:44: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1726:14: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/admin.c:1728:14: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/admin.c:1730:13: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1726:14: branch_true: following ‘true’ branch (when ‘bufptr < bufend’)...
cups-2.4.16/cgi-bin/admin.c:1726:39: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1726:14: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1747:9: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1749:9: throw: if ‘cgiSetVariable’ throws an exception...
cups-2.4.16/cgi-bin/admin.c:1749:9: danger: ‘buffer’ leaks here; was allocated at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
# 1747|   	*bufptr = '\0';
# 1748|   
# 1749|-> 	cgiSetVariable("CUPSDCONF_DEFAULT", buffer);
# 1750|   	free(buffer);
# 1751|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def79]
cups-2.4.16/cgi-bin/admin.c:1749:9: warning[-Wanalyzer-malloc-leak]: leak of ‘bufptr’
cups-2.4.16/cgi-bin/admin.c:1248:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1522:12: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1648:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1661:9: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1661:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1681:18: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1681:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1702:37: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1718:8: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/admin.c:1721:21: acquire_memory: allocated here
cups-2.4.16/cgi-bin/admin.c:1721:10: branch_true: following ‘true’ branch (when ‘buffer’ is non-NULL)...
cups-2.4.16/cgi-bin/admin.c:1723:44: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1726:14: branch_true: following ‘true’ branch (when ‘bufptr < bufend’)...
cups-2.4.16/cgi-bin/admin.c:1726:39: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1726:14: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/admin.c:1747:9: branch_false: ...to here
cups-2.4.16/cgi-bin/admin.c:1749:9: throw: if ‘cgiSetVariable’ throws an exception...
cups-2.4.16/cgi-bin/admin.c:1749:9: danger: ‘bufptr’ leaks here; was allocated at [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10)
# 1747|   	*bufptr = '\0';
# 1748|   
# 1749|-> 	cgiSetVariable("CUPSDCONF_DEFAULT", buffer);
# 1750|   	free(buffer);
# 1751|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
cups-2.4.16/cgi-bin/admin.c:1989:7: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*attr.values[0].string.text)’
cups-2.4.16/cgi-bin/admin.c:1968:6: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/admin.c:1983:23: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1986:10: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.16/cgi-bin/admin.c:1989:44: branch_true: ...to here
cups-2.4.16/cgi-bin/admin.c:1989:37: acquire_memory: allocated here
cups-2.4.16/cgi-bin/admin.c:1989:7: danger: ‘strdup(*attr.values[0].string.text)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
# 1987|   	 attr = ippFindNextAttribute(response, "device-uri", IPP_TAG_URI))
# 1988|       {
# 1989|->       cupsArrayAdd(printer_devices, strdup(attr->values[0].string.text));
# 1990|       }
# 1991|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
cups-2.4.16/cgi-bin/help-index.c:1041:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
cups-2.4.16/cgi-bin/help-index.c:838:1: enter_function: entry to ‘help_load_file’
cups-2.4.16/cgi-bin/help-index.c:858:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:864:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:866:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help-index.c:872:16: branch_true: ...to here
cups-2.4.16/cgi-bin/help-index.c:872:8: branch_false: following ‘false’ branch (when ‘ptr’ is NULL)...
cups-2.4.16/cgi-bin/help-index.c:872:8: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:895:22: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/cgi-bin/help-index.c:897:7: branch_true: ...to here
cups-2.4.16/cgi-bin/help-index.c:986:10: branch_false: following ‘false’ branch (when ‘node’ is NULL)...
cups-2.4.16/cgi-bin/help-index.c:989:12: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:989:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:995:19: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:995:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:1033:16: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:1033:16: call_function: calling ‘help_new_node’ from ‘help_load_file’
cups-2.4.16/cgi-bin/help-index.c:1033:16: return_function: returning to ‘help_load_file’ from ‘help_new_node’
cups-2.4.16/cgi-bin/help-index.c:1041:12: danger: dereference of NULL ‘node’
# 1039|         */
# 1040|   
# 1041|->       for (ptr = node->text, text = node->text; *ptr;)
# 1042|   	if (isspace(*ptr & 255))
# 1043|   	{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def82]
cups-2.4.16/cgi-bin/help-index.c:1041:49: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’
cups-2.4.16/cgi-bin/help-index.c:838:1: enter_function: entry to ‘help_load_file’
cups-2.4.16/cgi-bin/help-index.c:858:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:864:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:866:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help-index.c:872:16: branch_true: ...to here
cups-2.4.16/cgi-bin/help-index.c:872:8: branch_false: following ‘false’ branch (when ‘ptr’ is NULL)...
cups-2.4.16/cgi-bin/help-index.c:872:8: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:895:22: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/cgi-bin/help-index.c:897:7: branch_true: ...to here
cups-2.4.16/cgi-bin/help-index.c:986:10: branch_false: following ‘false’ branch (when ‘node’ is NULL)...
cups-2.4.16/cgi-bin/help-index.c:989:12: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:989:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:995:19: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:995:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:1033:16: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:1033:16: call_function: calling ‘help_new_node’ from ‘help_load_file’
cups-2.4.16/cgi-bin/help-index.c:1033:16: return_function: returning to ‘help_load_file’ from ‘help_new_node’
cups-2.4.16/cgi-bin/help-index.c:1041:49: danger: ‘ptr’ could be NULL: unchecked value from [(29)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/28)
# 1039|         */
# 1040|   
# 1041|->       for (ptr = node->text, text = node->text; *ptr;)
# 1042|   	if (isspace(*ptr & 255))
# 1043|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
cups-2.4.16/cgi-bin/help-index.c:1063:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/cgi-bin/help-index.c:838:1: enter_function: entry to ‘help_load_file’
cups-2.4.16/cgi-bin/help-index.c:858:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:864:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:866:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help-index.c:872:16: branch_true: ...to here
cups-2.4.16/cgi-bin/help-index.c:872:8: branch_false: following ‘false’ branch (when ‘ptr’ is NULL)...
cups-2.4.16/cgi-bin/help-index.c:872:8: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:895:22: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/cgi-bin/help-index.c:897:7: branch_true: ...to here
cups-2.4.16/cgi-bin/help-index.c:986:10: branch_false: following ‘false’ branch (when ‘node’ is NULL)...
cups-2.4.16/cgi-bin/help-index.c:989:12: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:989:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:995:19: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:995:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:1033:16: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:1033:16: call_function: calling ‘help_new_node’ from ‘help_load_file’
cups-2.4.16/cgi-bin/help-index.c:1033:16: return_function: returning to ‘help_load_file’ from ‘help_new_node’
cups-2.4.16/cgi-bin/help-index.c:1041:49: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:1057:7: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:1063:7: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/cgi-bin/help-index.c:1063:7: danger: ‘<unknown>’ leaks here; was allocated at [(23)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/22)
# 1061|         */
# 1062|   
# 1063|->       cupsArrayAdd(hi->nodes, node);
# 1064|   
# 1065|         if (!anchor)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
cups-2.4.16/cgi-bin/help-index.c:1063:7: warning[-Wanalyzer-malloc-leak]: leak of ‘node’
cups-2.4.16/cgi-bin/help-index.c:838:1: enter_function: entry to ‘help_load_file’
cups-2.4.16/cgi-bin/help-index.c:858:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:864:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:866:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help-index.c:872:16: branch_true: ...to here
cups-2.4.16/cgi-bin/help-index.c:872:8: branch_false: following ‘false’ branch (when ‘ptr’ is NULL)...
cups-2.4.16/cgi-bin/help-index.c:872:8: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:895:22: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/cgi-bin/help-index.c:897:7: branch_true: ...to here
cups-2.4.16/cgi-bin/help-index.c:986:10: branch_false: following ‘false’ branch (when ‘node’ is NULL)...
cups-2.4.16/cgi-bin/help-index.c:989:12: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:989:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:995:19: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:995:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:1033:16: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:1033:16: call_function: calling ‘help_new_node’ from ‘help_load_file’
cups-2.4.16/cgi-bin/help-index.c:1033:16: return_function: returning to ‘help_load_file’ from ‘help_new_node’
cups-2.4.16/cgi-bin/help-index.c:1041:49: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:1057:7: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:1063:7: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/cgi-bin/help-index.c:1063:7: danger: ‘node’ leaks here; was allocated at [(21)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/20)
# 1061|         */
# 1062|   
# 1063|->       cupsArrayAdd(hi->nodes, node);
# 1064|   
# 1065|         if (!anchor)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
cups-2.4.16/cgi-bin/help-index.c:1063:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.16/cgi-bin/help-index.c:838:1: enter_function: entry to ‘help_load_file’
cups-2.4.16/cgi-bin/help-index.c:858:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:864:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:866:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help-index.c:872:16: branch_true: ...to here
cups-2.4.16/cgi-bin/help-index.c:872:8: branch_false: following ‘false’ branch (when ‘ptr’ is NULL)...
cups-2.4.16/cgi-bin/help-index.c:872:8: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:895:22: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/cgi-bin/help-index.c:897:7: branch_true: ...to here
cups-2.4.16/cgi-bin/help-index.c:986:10: branch_false: following ‘false’ branch (when ‘node’ is NULL)...
cups-2.4.16/cgi-bin/help-index.c:989:12: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:989:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:995:19: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:995:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:1033:16: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:1033:16: call_function: calling ‘help_new_node’ from ‘help_load_file’
cups-2.4.16/cgi-bin/help-index.c:1033:16: return_function: returning to ‘help_load_file’ from ‘help_new_node’
cups-2.4.16/cgi-bin/help-index.c:1041:49: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help-index.c:1057:7: branch_false: ...to here
cups-2.4.16/cgi-bin/help-index.c:1063:7: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/cgi-bin/help-index.c:1063:7: danger: ‘ptr’ leaks here; was allocated at [(29)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/28)
# 1061|         */
# 1062|   
# 1063|->       cupsArrayAdd(hi->nodes, node);
# 1064|   
# 1065|         if (!anchor)

Error: CPPCHECK_WARNING (CWE-401): [#def86]
cups-2.4.16/cgi-bin/help-index.c:1201: error[memleak]: Memory leak: n.filename
# 1199|     n->length   = length;
# 1200|   
# 1201|->   return (n);
# 1202|   }
# 1203|   

Error: CPPCHECK_WARNING (CWE-401): [#def87]
cups-2.4.16/cgi-bin/help-index.c:1201: error[memleak]: Memory leak: n.text
# 1199|     n->length   = length;
# 1200|   
# 1201|->   return (n);
# 1202|   }
# 1203|   

Error: CPPCHECK_WARNING (CWE-457): [#def88]
cups-2.4.16/cgi-bin/help-index.c:1250: error[uninitvar]: Uninitialized variable: diff
# 1248|     else if (n1->section && n2->section &&
# 1249|              (diff = strcmp(n1->section, n2->section)) != 0)
# 1250|->     return (diff);
# 1251|   
# 1252|     return (_cups_strcasecmp(n1->text, n2->text));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
cups-2.4.16/cgi-bin/help.c:178:11: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:178:11: throw: if ‘helpSearchIndex’ throws an exception...
cups-2.4.16/cgi-bin/help.c:178:11: danger: ‘query’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  176|       query = strdup(query);
#  177|   
#  178|->   si    = helpSearchIndex(hi, query, topic, helpfile);
#  179|   
#  180|     cgiClearVariables();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
cups-2.4.16/cgi-bin/help.c:180:3: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:180:3: throw: if ‘cgiClearVariables’ throws an exception...
cups-2.4.16/cgi-bin/help.c:180:3: danger: ‘query’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  178|     si    = helpSearchIndex(hi, query, topic, helpfile);
#  179|   
#  180|->   cgiClearVariables();
#  181|     if (query)
#  182|       cgiSetVariable("QUERY", query);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
cups-2.4.16/cgi-bin/help.c:182:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:182:5: throw: if ‘cgiSetVariable’ throws an exception...
cups-2.4.16/cgi-bin/help.c:182:5: danger: ‘query’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  180|     cgiClearVariables();
#  181|     if (query)
#  182|->     cgiSetVariable("QUERY", query);
#  183|     if (topic)
#  184|       cgiSetVariable("TOPIC", topic);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
cups-2.4.16/cgi-bin/help.c:184:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:183:6: branch_true: following ‘true’ branch (when ‘topic’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:184:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:184:5: throw: if ‘cgiSetVariable’ throws an exception...
cups-2.4.16/cgi-bin/help.c:184:5: danger: ‘query’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  182|       cgiSetVariable("QUERY", query);
#  183|     if (topic)
#  184|->     cgiSetVariable("TOPIC", topic);
#  185|     if (helpfile)
#  186|       cgiSetVariable("HELPFILE", helpfile);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
cups-2.4.16/cgi-bin/help.c:186:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:101:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:103:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:105:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:115:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:120:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:132:14: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:132:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:146:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:185:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:186:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:186:5: throw: if ‘cgiSetVariable’ throws an exception...
cups-2.4.16/cgi-bin/help.c:186:5: danger: ‘query’ leaks here; was allocated at [(15)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/14)
#  184|       cgiSetVariable("TOPIC", topic);
#  185|     if (helpfile)
#  186|->     cgiSetVariable("HELPFILE", helpfile);
#  187|     if (helptitle)
#  188|       cgiSetVariable("HELPTITLE", helptitle);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
cups-2.4.16/cgi-bin/help.c:188:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:101:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:103:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:105:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:115:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:120:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:132:14: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:132:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:146:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:185:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:186:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:187:6: branch_true: following ‘true’ branch (when ‘helptitle’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:188:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:188:5: throw: if ‘cgiSetVariable’ throws an exception...
cups-2.4.16/cgi-bin/help.c:188:5: danger: ‘query’ leaks here; was allocated at [(15)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/14)
#  186|       cgiSetVariable("HELPFILE", helpfile);
#  187|     if (helptitle)
#  188|->     cgiSetVariable("HELPTITLE", helptitle);
#  189|   
#  190|     fprintf(stderr, "DEBUG: query=\"%s\", topic=\"%s\"\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
cups-2.4.16/cgi-bin/help.c:198:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:185:6: branch_false: following ‘false’ branch (when ‘helpfile’ is NULL)...
cups-2.4.16/cgi-bin/help.c:187:6: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:187:6: branch_false: following ‘false’ branch (when ‘helptitle’ is NULL)...
cups-2.4.16/cgi-bin/help.c:190:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:193:6: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:198:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:198:5: throw: if ‘cupsArrayCount’ throws an exception...
cups-2.4.16/cgi-bin/help.c:198:5: danger: ‘query’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  196|   
#  197|   
#  198|->     fprintf(stderr,
#  199|               "DEBUG: si=%p, si->sorted=%p, cupsArrayCount(si->sorted)=%d\n", si,
#  200|               si->sorted, cupsArrayCount(si->sorted));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
cups-2.4.16/cgi-bin/help.c:202:36: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:185:6: branch_false: following ‘false’ branch (when ‘helpfile’ is NULL)...
cups-2.4.16/cgi-bin/help.c:187:6: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:187:6: branch_false: following ‘false’ branch (when ‘helptitle’ is NULL)...
cups-2.4.16/cgi-bin/help.c:190:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:193:6: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:198:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:202:36: throw: if ‘cupsArrayFirst’ throws an exception...
cups-2.4.16/cgi-bin/help.c:202:36: danger: ‘query’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  200|               si->sorted, cupsArrayCount(si->sorted));
#  201|   
#  202|->     for (i = 0, n = (help_node_t *)cupsArrayFirst(si->sorted);
#  203|            n;
#  204|   	 i ++, n = (help_node_t *)cupsArrayNext(si->sorted))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def97]
cups-2.4.16/cgi-bin/help.c:215:7: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:101:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:103:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:105:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:115:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:120:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:132:14: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:132:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:146:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:185:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:186:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:193:6: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:198:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:203:10: branch_true: following ‘true’ branch (when ‘n’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:206:10: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:206:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:215:7: throw: if ‘cgiSetArray’ throws an exception...
cups-2.4.16/cgi-bin/help.c:215:7: danger: ‘query’ leaks here; was allocated at [(15)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/14)
#  213|   	         query ? query : "");
#  214|   
#  215|->       cgiSetArray("QTEXT", i, n->text);
#  216|         cgiSetArray("QLINK", i, line);
#  217|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
cups-2.4.16/cgi-bin/help.c:216:7: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:101:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:103:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:105:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:115:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:120:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:132:14: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:132:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:146:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:185:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:186:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:193:6: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:198:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:203:10: branch_true: following ‘true’ branch (when ‘n’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:206:10: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:206:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:216:7: throw: if ‘cgiSetArray’ throws an exception...
cups-2.4.16/cgi-bin/help.c:216:7: danger: ‘query’ leaks here; was allocated at [(15)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/14)
#  214|   
#  215|         cgiSetArray("QTEXT", i, n->text);
#  216|->       cgiSetArray("QLINK", i, line);
#  217|   
#  218|         if (!helpfile && n->anchor)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def99]
cups-2.4.16/cgi-bin/help.c:230:9: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:101:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:103:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:105:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:115:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:120:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:132:14: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:132:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:146:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:185:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:186:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:193:6: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:198:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:203:10: branch_true: following ‘true’ branch (when ‘n’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:206:10: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:206:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:218:10: branch_false: following ‘false’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:230:9: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:230:9: throw: if ‘cgiSetArray’ throws an exception...
cups-2.4.16/cgi-bin/help.c:230:9: danger: ‘query’ leaks here; was allocated at [(15)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/14)
#  228|         else
#  229|         {
#  230|->         cgiSetArray("QPTEXT", i, "");
#  231|   	cgiSetArray("QPLINK", i, "");
#  232|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
cups-2.4.16/cgi-bin/help.c:231:9: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.16/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:101:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:103:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:105:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:115:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:120:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:132:14: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:132:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:146:5: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.16/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:185:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:186:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:193:6: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:198:5: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:203:10: branch_true: following ‘true’ branch (when ‘n’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:206:10: branch_true: ...to here
cups-2.4.16/cgi-bin/help.c:206:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/help.c:218:10: branch_false: following ‘false’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.16/cgi-bin/help.c:230:9: branch_false: ...to here
cups-2.4.16/cgi-bin/help.c:231:9: throw: if ‘cgiSetArray’ throws an exception...
cups-2.4.16/cgi-bin/help.c:231:9: danger: ‘query’ leaks here; was allocated at [(15)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/14)
#  229|         {
#  230|           cgiSetArray("QPTEXT", i, "");
#  231|-> 	cgiSetArray("QPLINK", i, "");
#  232|         }
#  233|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def101]
cups-2.4.16/cgi-bin/ipp-var.c:91:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, "r")’
cups-2.4.16/cgi-bin/ipp-var.c:1347:1: enter_function: entry to ‘cgiShowJobs’
cups-2.4.16/cgi-bin/ipp-var.c:1403:3: call_function: calling ‘cgiGetAttributes’ from ‘cgiShowJobs’
#   89|       if (ch == '\\')
#   90|         getc(in);
#   91|->     else if (ch == '{' && num_attrs < (int)(sizeof(attrs) / sizeof(attrs[0])))
#   92|       {
#   93|        /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
cups-2.4.16/cgi-bin/ipp-var.c:91:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, "r")’
cups-2.4.16/cgi-bin/ipp-var.c:1347:1: enter_function: entry to ‘cgiShowJobs’
cups-2.4.16/cgi-bin/ipp-var.c:1403:3: call_function: calling ‘cgiGetAttributes’ from ‘cgiShowJobs’
#   89|       if (ch == '\\')
#   90|         getc(in);
#   91|->     else if (ch == '{' && num_attrs < (int)(sizeof(attrs) / sizeof(attrs[0])))
#   92|       {
#   93|        /*

Error: GCC_ANALYZER_WARNING (CWE-688): [#def103]
cups-2.4.16/cgi-bin/ipp-var.c:120:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘attrs[i]’ where non-null expected
cups-2.4.16/cgi-bin/ipp-var.c:1347:1: enter_function: entry to ‘cgiShowJobs’
cups-2.4.16/cgi-bin/ipp-var.c:1403:3: call_function: calling ‘cgiGetAttributes’ from ‘cgiShowJobs’
#  118|   
#  119|         for (i = 0; i < num_attrs; i ++)
#  120|->         if (!strcmp(attrs[i], name))
#  121|   	  break;
#  122|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
cups-2.4.16/cgi-bin/ipp-var.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs[1]’
cups-2.4.16/cgi-bin/ipp-var.c:1347:1: enter_function: entry to ‘cgiShowJobs’
cups-2.4.16/cgi-bin/ipp-var.c:1403:3: call_function: calling ‘cgiGetAttributes’ from ‘cgiShowJobs’
#  135|     if (num_attrs > 0)
#  136|     {
#  137|->     ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
#  138|                     "requested-attributes", num_attrs, NULL, (const char **)attrs);
#  139|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
cups-2.4.16/cgi-bin/ipp-var.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs[first]’
cups-2.4.16/cgi-bin/ipp-var.c:1347:1: enter_function: entry to ‘cgiShowJobs’
cups-2.4.16/cgi-bin/ipp-var.c:1403:3: call_function: calling ‘cgiGetAttributes’ from ‘cgiShowJobs’
#  135|     if (num_attrs > 0)
#  136|     {
#  137|->     ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
#  138|                     "requested-attributes", num_attrs, NULL, (const char **)attrs);
#  139|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
cups-2.4.16/cgi-bin/search.c:136:23: warning[-Wanalyzer-malloc-leak]: leak of ‘re’
cups-2.4.16/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:51:24: acquire_memory: allocated here
cups-2.4.16/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:86:12: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:89:8: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:96:8: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/search.c:102:17: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:103:25: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/search.c:103:25: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:103:25: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:105:10: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:105:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:130:20: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:136:8: branch_true: following ‘true’ branch (when ‘wlen == 3’)...
cups-2.4.16/cgi-bin/search.c:136:23: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:136:23: throw: if ‘_cups_strncasecmp’ throws an exception...
cups-2.4.16/cgi-bin/search.c:136:23: danger: ‘re’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  134|       */
#  135|   
#  136|->     if (wlen == 3 && !_cups_strncasecmp(qptr, "AND", 3))
#  137|       {
#  138|        /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
cups-2.4.16/cgi-bin/search.c:136:23: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
cups-2.4.16/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:64:20: acquire_memory: allocated here
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:86:12: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:89:8: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:96:8: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/search.c:102:17: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:103:25: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/search.c:103:25: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:103:25: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:105:10: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:105:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:130:20: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:136:8: branch_true: following ‘true’ branch (when ‘wlen == 3’)...
cups-2.4.16/cgi-bin/search.c:136:23: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:136:23: throw: if ‘_cups_strncasecmp’ throws an exception...
cups-2.4.16/cgi-bin/search.c:136:23: danger: ‘s’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  134|       */
#  135|   
#  136|->     if (wlen == 3 && !_cups_strncasecmp(qptr, "AND", 3))
#  137|       {
#  138|        /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
cups-2.4.16/cgi-bin/search.c:147:28: warning[-Wanalyzer-malloc-leak]: leak of ‘re’
cups-2.4.16/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:51:24: acquire_memory: allocated here
cups-2.4.16/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:96:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:127:12: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:136:8: branch_false: following ‘false’ branch (when ‘wlen != 3’)...
cups-2.4.16/cgi-bin/search.c:147:13: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:147:13: branch_true: following ‘true’ branch (when ‘wlen == 2’)...
cups-2.4.16/cgi-bin/search.c:147:28: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:147:28: throw: if ‘_cups_strncasecmp’ throws an exception...
cups-2.4.16/cgi-bin/search.c:147:28: danger: ‘re’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  145|         qptr = qend;
#  146|       }
#  147|->     else if (wlen == 2 && !_cups_strncasecmp(qptr, "OR", 2))
#  148|       {
#  149|        /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
cups-2.4.16/cgi-bin/search.c:147:28: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
cups-2.4.16/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:64:20: acquire_memory: allocated here
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:96:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:127:12: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:136:8: branch_false: following ‘false’ branch (when ‘wlen != 3’)...
cups-2.4.16/cgi-bin/search.c:147:13: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:147:13: branch_true: following ‘true’ branch (when ‘wlen == 2’)...
cups-2.4.16/cgi-bin/search.c:147:28: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:147:28: throw: if ‘_cups_strncasecmp’ throws an exception...
cups-2.4.16/cgi-bin/search.c:147:28: danger: ‘s’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  145|         qptr = qend;
#  146|       }
#  147|->     else if (wlen == 2 && !_cups_strncasecmp(qptr, "OR", 2))
#  148|       {
#  149|        /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
cups-2.4.16/cgi-bin/search.c:296:7: warning[-Wanalyzer-malloc-leak]: leak of ‘re’
cups-2.4.16/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:51:24: acquire_memory: allocated here
cups-2.4.16/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:136:8: branch_false: following ‘false’ branch (when ‘wlen != 3’)...
cups-2.4.16/cgi-bin/search.c:147:13: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:166:10: branch_false: following ‘false’ branch (when ‘lword’ is NULL)...
cups-2.4.16/cgi-bin/search.c:169:10: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:169:10: branch_false: following ‘false’ branch (when ‘slen >= wlen’)...
cups-2.4.16/cgi-bin/search.c:200:28: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:210:14: branch_false: following ‘false’ branch (when ‘qptr >= qend’)...
cups-2.4.16/cgi-bin/search.c:222:7: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:228:11: branch_false: following ‘false’ branch (when ‘lword’ is NULL)...
cups-2.4.16/cgi-bin/search.c:261:17: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:278:6: branch_true: following ‘true’ branch (when ‘s < sptr’)...
cups-2.4.16/cgi-bin/search.c:279:5: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:296:7: throw: if ‘regcomp’ throws an exception...
cups-2.4.16/cgi-bin/search.c:296:7: danger: ‘re’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#  294|     */
#  295|   
#  296|->   if (regcomp(re, s, REG_EXTENDED | REG_ICASE))
#  297|     {
#  298|       free(re);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def111]
cups-2.4.16/cgi-bin/search.c:296:7: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
cups-2.4.16/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:64:6: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/search.c:80:10: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:136:8: branch_false: following ‘false’ branch (when ‘wlen != 3’)...
cups-2.4.16/cgi-bin/search.c:147:13: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:147:14: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/search.c:165:22: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:166:10: branch_false: following ‘false’ branch (when ‘lword’ is NULL)...
cups-2.4.16/cgi-bin/search.c:169:10: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:169:10: branch_true: following ‘true’ branch (when ‘slen < wlen’)...
cups-2.4.16/cgi-bin/search.c:179:9: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:181:12: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/cgi-bin/search.c:192:9: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:210:14: branch_false: following ‘false’ branch (when ‘qptr >= qend’)...
cups-2.4.16/cgi-bin/search.c:222:7: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:228:11: branch_false: following ‘false’ branch (when ‘lword’ is NULL)...
cups-2.4.16/cgi-bin/search.c:261:17: branch_false: ...to here
cups-2.4.16/cgi-bin/search.c:278:6: branch_true: following ‘true’ branch (when ‘s < sptr’)...
cups-2.4.16/cgi-bin/search.c:279:5: branch_true: ...to here
cups-2.4.16/cgi-bin/search.c:296:7: throw: if ‘regcomp’ throws an exception...
cups-2.4.16/cgi-bin/search.c:296:7: danger: ‘s’ leaks here; was allocated at [(19)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/18)
#  294|     */
#  295|   
#  296|->   if (regcomp(re, s, REG_EXTENDED | REG_ICASE))
#  297|     {
#  298|       free(re);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
cups-2.4.16/cgi-bin/var.c:642:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_vars’
cups-2.4.16/cgi-bin/var.c:619:6: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/var.c:624:8: branch_true: ...to here
cups-2.4.16/cgi-bin/var.c:624:8: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/var.c:627:46: branch_false: ...to here
cups-2.4.16/cgi-bin/var.c:629:8: branch_false: following ‘false’ branch (when ‘temp_vars’ is non-NULL)...
cups-2.4.16/cgi-bin/var.c:632:21: branch_false: ...to here
cups-2.4.16/cgi-bin/var.c:634:8: branch_true: following ‘true’ branch...
cups-2.4.16/cgi-bin/var.c:640:10: branch_true: ...to here
cups-2.4.16/cgi-bin/var.c:640:10: branch_false: following ‘false’ branch...
cups-2.4.16/cgi-bin/var.c:642:7: branch_false: ...to here
cups-2.4.16/cgi-bin/var.c:642:7: danger: ‘temp_vars’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  640|         if (form_alloc == 0)
#  641|           free(temp_vars);
#  642|->       return;
#  643|       }
#  644|       form_vars = temp_vars;

Error: CPPCHECK_WARNING (CWE-457): [#def113]
cups-2.4.16/cgi-bin/var.c:691: warning[uninitvar]: Uninitialized variables: &key.nvalues, &key.avalues, &key.values
#  689|     key.name = (char *)name;
#  690|   
#  691|->   return ((_cgi_var_t *)bsearch(&key, form_vars, (size_t)form_count, sizeof(_cgi_var_t),
#  692|                              (int (*)(const void *, const void *))cgi_compare_variables));
#  693|   }

Error: CPPCHECK_WARNING (CWE-401): [#def114]
cups-2.4.16/cups/array.c:426: error[memleak]: Memory leak: da.elements
#  424|     */
#  425|   
#  426|->   return (da);
#  427|   }
#  428|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def115]
cups-2.4.16/cups/array.c:465:12: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
cups-2.4.16/cups/array.c:111:1: enter_function: entry to ‘_cupsArrayAddStrings’
cups-2.4.16/cups/array.c:156:22: acquire_memory: allocated here
cups-2.4.16/cups/array.c:156:11: branch_false: following ‘false’ branch (when ‘buffer’ is non-NULL)...
cups-2.4.16/cups/array.c:156:11: branch_false: ...to here
cups-2.4.16/cups/array.c:163:32: branch_true: following ‘true’ branch...
cups-2.4.16/cups/array.c:170:10: branch_true: ...to here
cups-2.4.16/cups/array.c:170:10: branch_true: following ‘true’ branch (when ‘delim == 32’)...
cups-2.4.16/cups/array.c:170:10: branch_true: ...to here
cups-2.4.16/cups/array.c:185:12: call_function: calling ‘cupsArrayFind’ from ‘_cupsArrayAddStrings’
#  463|     if (a->hash)
#  464|     {
#  465|->     hash = (*(a->hashfunc))(e, a->data);
#  466|   
#  467|       if (hash < 0 || hash >= a->hashsize)

Error: CPPCHECK_WARNING (CWE-401): [#def116]
cups-2.4.16/cups/array.c:772: error[memleak]: Memory leak: a.hash
#  770|     a->freefunc = ff;
#  771|   
#  772|->   return (a);
#  773|   }
#  774|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def117]
cups-2.4.16/cups/array.c:1218:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
cups-2.4.16/cups/array.c:1013:1: enter_function: entry to ‘cups_array_add’
cups-2.4.16/cups/array.c:1028:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/array.c:1040:8: branch_true: ...to here
cups-2.4.16/cups/array.c:1040:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/array.c:1043:15: branch_true: ...to here
cups-2.4.16/cups/array.c:1057:8: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/cups/array.c:1063:5: branch_false: ...to here
cups-2.4.16/cups/array.c:1072:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/array.c:1089:15: call_function: calling ‘cups_array_find’ from ‘cups_array_add’
# 1216|         */
# 1217|   
# 1218|->       if ((diff = (*(a->compare))(e, a->elements[prev], a->data)) == 0 ||
# 1219|             (diff < 0 && prev == 0) ||
# 1220|   	  (diff > 0 && prev == (a->num_elements - 1)))

Error: GCC_ANALYZER_WARNING (CWE-457): [#def118]
cups-2.4.16/cups/array.c:1264:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
cups-2.4.16/cups/array.c:1013:1: enter_function: entry to ‘cups_array_add’
cups-2.4.16/cups/array.c:1028:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/array.c:1040:8: branch_true: ...to here
cups-2.4.16/cups/array.c:1040:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/array.c:1043:15: branch_true: ...to here
cups-2.4.16/cups/array.c:1057:8: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/cups/array.c:1063:5: branch_false: ...to here
cups-2.4.16/cups/array.c:1072:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/array.c:1089:15: call_function: calling ‘cups_array_find’ from ‘cups_array_add’
# 1262|       {
# 1263|         current = (left + right) / 2;
# 1264|->       diff    = (*(a->compare))(e, a->elements[current], a->data);
# 1265|   
# 1266|         DEBUG_printf(("9cups_array_find: left=%d, right=%d, current=%d, diff=%d",

Error: GCC_ANALYZER_WARNING (CWE-457): [#def119]
cups-2.4.16/cups/array.c:1304:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
cups-2.4.16/cups/array.c:111:1: enter_function: entry to ‘_cupsArrayAddStrings’
cups-2.4.16/cups/array.c:143:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/array.c:143:7: branch_true: ...to here
cups-2.4.16/cups/array.c:153:10: call_function: calling ‘cupsArrayFind’ from ‘_cupsArrayAddStrings’
cups-2.4.16/cups/array.c:153:10: return_function: returning to ‘_cupsArrayAddStrings’ from ‘cupsArrayFind’
cups-2.4.16/cups/array.c:153:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/array.c:154:16: branch_true: ...to here
cups-2.4.16/cups/array.c:154:16: call_function: calling ‘cupsArrayAdd’ from ‘_cupsArrayAddStrings’
# 1302|   
# 1303|       for (current = 0; current < a->num_elements; current ++)
# 1304|->       if (a->elements[current] == e)
# 1305|         {
# 1306|           diff = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
cups-2.4.16/cups/dest-localization.c:214:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/cups/dest-localization.c:273:1: enter_function: entry to ‘cupsLocalizeDestValue’
cups-2.4.16/cups/dest-localization.c:291:6: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/cups/dest-localization.c:293:26: branch_true: ...to here
cups-2.4.16/cups/dest-localization.c:304:12: call_function: calling ‘cupsLocalizeDestMedia’ from ‘cupsLocalizeDestValue’
#  212|     match->str = strdup(lstr);
#  213|   
#  214|->   cupsArrayAdd(dinfo->localizations, match);
#  215|   
#  216|     DEBUG_printf(("1cupsLocalizeDestMedia: Returning \"%s\".", match->str));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def121]
cups-2.4.16/cups/dest-localization.c:214:3: warning[-Wanalyzer-malloc-leak]: leak of ‘match’
cups-2.4.16/cups/dest-localization.c:273:1: enter_function: entry to ‘cupsLocalizeDestValue’
cups-2.4.16/cups/dest-localization.c:291:6: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/cups/dest-localization.c:293:26: branch_true: ...to here
cups-2.4.16/cups/dest-localization.c:304:12: call_function: calling ‘cupsLocalizeDestMedia’ from ‘cupsLocalizeDestValue’
#  212|     match->str = strdup(lstr);
#  213|   
#  214|->   cupsArrayAdd(dinfo->localizations, match);
#  215|   
#  216|     DEBUG_printf(("1cupsLocalizeDestMedia: Returning \"%s\".", match->str));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
cups-2.4.16/cups/dest-options.c:1403:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/cups/dest-options.c:1902:1: enter_function: entry to ‘cups_create_constraints’
cups-2.4.16/cups/dest-options.c:1916:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/dest-options.c:1919:10: branch_true: ...to here
cups-2.4.16/cups/dest-options.c:1919:52: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/dest-options.c:1920:7: branch_true: ...to here
cups-2.4.16/cups/dest-options.c:1920:7: call_function: calling ‘cups_add_dconstres’ from ‘cups_create_constraints’
# 1401|     temp->collection = collection;
# 1402|   
# 1403|->   cupsArrayAdd(a, temp);
# 1404|   }
# 1405|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
cups-2.4.16/cups/dest-options.c:1794:19: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/cups/dest-options.c:1790:15: acquire_memory: allocated here
cups-2.4.16/cups/dest-options.c:1790:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/cups/dest-options.c:1793:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1793:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/dest-options.c:1794:19: branch_true: ...to here
cups-2.4.16/cups/dest-options.c:1794:19: throw: if ‘_cupsStrAlloc’ throws an exception...
cups-2.4.16/cups/dest-options.c:1794:19: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1792|   
# 1793|     if (mdb->color)
# 1794|->     temp->color = _cupsStrAlloc(mdb->color);
# 1795|     if (mdb->key)
# 1796|       temp->key = _cupsStrAlloc(mdb->key);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
cups-2.4.16/cups/dest-options.c:1796:17: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/cups/dest-options.c:1790:15: acquire_memory: allocated here
cups-2.4.16/cups/dest-options.c:1790:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/cups/dest-options.c:1793:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1793:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1795:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1795:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/dest-options.c:1796:17: branch_true: ...to here
cups-2.4.16/cups/dest-options.c:1796:17: throw: if ‘_cupsStrAlloc’ throws an exception...
cups-2.4.16/cups/dest-options.c:1796:17: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1794|       temp->color = _cupsStrAlloc(mdb->color);
# 1795|     if (mdb->key)
# 1796|->     temp->key = _cupsStrAlloc(mdb->key);
# 1797|     if (mdb->info)
# 1798|       temp->info = _cupsStrAlloc(mdb->info);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
cups-2.4.16/cups/dest-options.c:1798:18: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/cups/dest-options.c:1790:15: acquire_memory: allocated here
cups-2.4.16/cups/dest-options.c:1790:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/cups/dest-options.c:1793:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1793:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1795:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1795:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1797:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1797:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/dest-options.c:1798:18: branch_true: ...to here
cups-2.4.16/cups/dest-options.c:1798:18: throw: if ‘_cupsStrAlloc’ throws an exception...
cups-2.4.16/cups/dest-options.c:1798:18: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 1796|       temp->key = _cupsStrAlloc(mdb->key);
# 1797|     if (mdb->info)
# 1798|->     temp->info = _cupsStrAlloc(mdb->info);
# 1799|     if (mdb->size_name)
# 1800|       temp->size_name = _cupsStrAlloc(mdb->size_name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
cups-2.4.16/cups/dest-options.c:1800:23: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/cups/dest-options.c:1790:15: acquire_memory: allocated here
cups-2.4.16/cups/dest-options.c:1790:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/cups/dest-options.c:1793:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1793:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1795:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1795:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1797:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1797:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1799:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1799:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/dest-options.c:1800:23: branch_true: ...to here
cups-2.4.16/cups/dest-options.c:1800:23: throw: if ‘_cupsStrAlloc’ throws an exception...
cups-2.4.16/cups/dest-options.c:1800:23: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1798|       temp->info = _cupsStrAlloc(mdb->info);
# 1799|     if (mdb->size_name)
# 1800|->     temp->size_name = _cupsStrAlloc(mdb->size_name);
# 1801|     if (mdb->source)
# 1802|       temp->source = _cupsStrAlloc(mdb->source);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
cups-2.4.16/cups/dest-options.c:1802:20: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/cups/dest-options.c:1790:15: acquire_memory: allocated here
cups-2.4.16/cups/dest-options.c:1790:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/cups/dest-options.c:1793:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1793:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1795:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1795:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1797:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1797:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1799:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1799:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1801:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1801:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/dest-options.c:1802:20: branch_true: ...to here
cups-2.4.16/cups/dest-options.c:1802:20: throw: if ‘_cupsStrAlloc’ throws an exception...
cups-2.4.16/cups/dest-options.c:1802:20: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1800|       temp->size_name = _cupsStrAlloc(mdb->size_name);
# 1801|     if (mdb->source)
# 1802|->     temp->source = _cupsStrAlloc(mdb->source);
# 1803|     if (mdb->type)
# 1804|       temp->type = _cupsStrAlloc(mdb->type);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
cups-2.4.16/cups/dest-options.c:1804:18: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/cups/dest-options.c:1790:15: acquire_memory: allocated here
cups-2.4.16/cups/dest-options.c:1790:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/cups/dest-options.c:1793:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1793:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1795:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1795:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1797:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1797:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1799:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1799:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1801:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1801:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest-options.c:1803:7: branch_false: ...to here
cups-2.4.16/cups/dest-options.c:1803:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/dest-options.c:1804:18: branch_true: ...to here
cups-2.4.16/cups/dest-options.c:1804:18: throw: if ‘_cupsStrAlloc’ throws an exception...
cups-2.4.16/cups/dest-options.c:1804:18: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 1802|       temp->source = _cupsStrAlloc(mdb->source);
# 1803|     if (mdb->type)
# 1804|->     temp->type = _cupsStrAlloc(mdb->type);
# 1805|   
# 1806|     temp->width  = mdb->width;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def129]
cups-2.4.16/cups/dest.c:2602:41: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
cups-2.4.16/cups/dest.c:4088:1: enter_function: entry to ‘cups_get_cb’
cups-2.4.16/cups/dest.c:4092:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/dest.c:4106:23: branch_false: ...to here
cups-2.4.16/cups/dest.c:4106:23: call_function: calling ‘cupsCopyDest’ from ‘cups_get_cb’
# 2600|   
# 2601|   
# 2602|->   if ((diff = _cups_strcasecmp(a->name, b->name)) != 0)
# 2603|       return (diff);
# 2604|     else if (a->instance && b->instance)

Error: COMPILER_WARNING: [#def130]
cups-2.4.16/cups/dest.c: scope_hint: In function ‘cups_enum_dests’
cups-2.4.16/cups/dest.c:3431:17: warning[-Wunused-but-set-variable=]: variable ‘count’ set but not used
# 3431 |   int           count,                  /* Number of queries started */
#      |                 ^~~~~
# 3429|     const char	*user_default;		/* Default printer from environment */
# 3430|   #ifdef HAVE_DNSSD
# 3431|->   int           count,                  /* Number of queries started */
# 3432|                   completed,              /* Number of completed queries */
# 3433|                   remaining;              /* Remainder of timeout */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
cups-2.4.16/cups/dir.c:317:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dp’
cups-2.4.16/cups/dir.c:302:6: branch_false: following ‘false’ branch (when ‘directory’ is non-NULL)...
cups-2.4.16/cups/dir.c:309:22: branch_false: ...to here
cups-2.4.16/cups/dir.c:309:22: acquire_memory: allocated here
cups-2.4.16/cups/dir.c:310:6: branch_false: following ‘false’ branch (when ‘dp’ is non-NULL)...
cups-2.4.16/cups/dir.c:317:13: branch_false: ...to here
cups-2.4.16/cups/dir.c:317:13: throw: if ‘opendir’ throws an exception...
cups-2.4.16/cups/dir.c:317:13: danger: ‘dp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  315|     */
#  316|   
#  317|->   dp->dir = opendir(directory);
#  318|     if (!dp->dir)
#  319|     {

Error: CPPCHECK_WARNING (CWE-457): [#def132]
cups-2.4.16/cups/encode.c:896: error[uninitvar]: Uninitialized variables: &key.multivalue, &key.value_tag, &key.group_tag, &key.alt_group_tag, &key.operations
#  894|     key.name = name;
#  895|   
#  896|->   return ((_ipp_option_t *)bsearch(&key, ipp_options,
#  897|                                      sizeof(ipp_options) / sizeof(ipp_options[0]),
#  898|   				   sizeof(ipp_options[0]),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
cups-2.4.16/cups/file.c:1293:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/cups/file.c:1979:1: enter_function: entry to ‘cupsFileStdin’
cups-2.4.16/cups/file.c:1988:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/file.c:1994:31: branch_true: ...to here
cups-2.4.16/cups/file.c:1994:31: call_function: calling ‘cupsFileOpenFd’ from ‘cupsFileStdin’
# 1291|   
# 1292|   #ifndef _WIN32
# 1293|->   fcntl(fp->fd, F_SETFD, fcntl(fp->fd, F_GETFD) | FD_CLOEXEC);
# 1294|   #endif /* !_WIN32 */
# 1295|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
cups-2.4.16/cups/file.c:1293:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/cups/file.c:1979:1: enter_function: entry to ‘cupsFileStdin’
cups-2.4.16/cups/file.c:1988:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/file.c:1994:31: branch_true: ...to here
cups-2.4.16/cups/file.c:1994:31: call_function: calling ‘cupsFileOpenFd’ from ‘cupsFileStdin’
# 1291|   
# 1292|   #ifndef _WIN32
# 1293|->   fcntl(fp->fd, F_SETFD, fcntl(fp->fd, F_GETFD) | FD_CLOEXEC);
# 1294|   #endif /* !_WIN32 */
# 1295|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def135]
cups-2.4.16/cups/getputfile.c:55:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 641)’
cups-2.4.16/cups/getputfile.c:221:1: enter_function: entry to ‘cupsGetFile’
cups-2.4.16/cups/getputfile.c:233:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/getputfile.c:245:13: acquire_resource: opened here
cups-2.4.16/cups/getputfile.c:245:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/getputfile.c:260:12: branch_false: ...to here
cups-2.4.16/cups/getputfile.c:260:12: call_function: calling ‘cupsGetFd’ from ‘cupsGetFile’
#   53|     DEBUG_printf(("cupsGetFd(http=%p, resource=\"%s\", fd=%d)", (void *)http, resource, fd));
#   54|   
#   55|->   if (!resource || fd < 0)
#   56|     {
#   57|       if (http)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def136]
cups-2.4.16/cups/getputfile.c:307:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
cups-2.4.16/cups/getputfile.c:519:1: enter_function: entry to ‘cupsPutFile’
cups-2.4.16/cups/getputfile.c:531:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/getputfile.c:543:13: acquire_resource: opened here
cups-2.4.16/cups/getputfile.c:543:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/getputfile.c:558:12: branch_false: ...to here
cups-2.4.16/cups/getputfile.c:558:12: call_function: calling ‘cupsPutFd’ from ‘cupsPutFile’
#  305|     DEBUG_printf(("cupsPutFd(http=%p, resource=\"%s\", fd=%d)", (void *)http, resource, fd));
#  306|   
#  307|->   if (!resource || fd < 0)
#  308|     {
#  309|       if (http)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def137]
cups-2.4.16/cups/globals.c:354:5: warning[-Wanalyzer-malloc-leak]: leak of ‘cg’
cups-2.4.16/cups/globals.c:183:25: acquire_memory: allocated here
cups-2.4.16/cups/globals.c:195:6: branch_false: following ‘false’ branch (when ‘cg’ is non-NULL)...
cups-2.4.16/cups/globals.c:203:3: branch_false: ...to here
cups-2.4.16/cups/globals.c:349:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/globals.c:354:31: branch_true: ...to here
cups-2.4.16/cups/globals.c:354:5: throw: if ‘getpwuid_r’ throws an exception...
cups-2.4.16/cups/globals.c:354:5: danger: ‘cg’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  352|       struct passwd	*result;	/* Auxiliary pointer */
#  353|   
#  354|->     getpwuid_r(getuid(), &pw, cg->pw_buf, PW_BUF_SIZE, &result);
#  355|       if (result)
#  356|         cg->home = _cupsStrAlloc(pw.pw_dir);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def138]
cups-2.4.16/cups/http-addr.c:260:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/cups/http-addr.c:157:1: enter_function: entry to ‘httpAddrListen’
cups-2.4.16/cups/http-addr.c:169:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/http-addr.c:176:3: branch_false: ...to here
cups-2.4.16/cups/http-addr.c:182:13: acquire_resource: stream socket created here
cups-2.4.16/cups/http-addr.c:182:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/cups/http-addr.c:188:3: branch_false: ...to here
cups-2.4.16/cups/http-addr.c:221:8: branch_true: following ‘true’ branch (when ‘status == 0’)...
cups-2.4.16/cups/http-addr.c:225:14: branch_true: ...to here
cups-2.4.16/cups/http-addr.c:228:66: call_function: calling ‘httpAddrLength’ from ‘httpAddrListen’
cups-2.4.16/cups/http-addr.c:228:66: return_function: returning to ‘httpAddrListen’ from ‘httpAddrLength’
cups-2.4.16/cups/http-addr.c:245:6: branch_false: following ‘false’ branch (when ‘status == 0’)...
cups-2.4.16/cups/http-addr.c:258:7: branch_false: ...to here
cups-2.4.16/cups/http-addr.c:258:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/http-addr.c:260:55: branch_true: ...to here
cups-2.4.16/cups/http-addr.c:260:5: throw: if ‘_cupsSetError’ throws an exception...
cups-2.4.16/cups/http-addr.c:260:5: danger: ‘fd’ leaks here
#  258|     if (listen(fd, INT_MAX))
#  259|     {
#  260|->     _cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(errno), 0);
#  261|   
#  262|       close(fd);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def139]
cups-2.4.16/cups/http-addr.c:262:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/cups/http-addr.c:157:1: enter_function: entry to ‘httpAddrListen’
cups-2.4.16/cups/http-addr.c:169:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/http-addr.c:176:3: branch_false: ...to here
cups-2.4.16/cups/http-addr.c:182:13: acquire_resource: stream socket created here
cups-2.4.16/cups/http-addr.c:182:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/cups/http-addr.c:188:3: branch_false: ...to here
cups-2.4.16/cups/http-addr.c:221:8: branch_true: following ‘true’ branch (when ‘status == 0’)...
cups-2.4.16/cups/http-addr.c:225:14: branch_true: ...to here
cups-2.4.16/cups/http-addr.c:228:66: call_function: calling ‘httpAddrLength’ from ‘httpAddrListen’
cups-2.4.16/cups/http-addr.c:228:66: return_function: returning to ‘httpAddrListen’ from ‘httpAddrLength’
cups-2.4.16/cups/http-addr.c:245:6: branch_false: following ‘false’ branch (when ‘status == 0’)...
cups-2.4.16/cups/http-addr.c:258:7: branch_false: ...to here
cups-2.4.16/cups/http-addr.c:258:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/http-addr.c:260:55: branch_true: ...to here
cups-2.4.16/cups/http-addr.c:262:5: throw: if ‘close’ throws an exception...
cups-2.4.16/cups/http-addr.c:262:5: danger: ‘fd’ leaks here
#  260|       _cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(errno), 0);
#  261|   
#  262|->     close(fd);
#  263|   
#  264|       return (-1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def140]
cups-2.4.16/cups/http-addr.c:272:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/cups/http-addr.c:157:1: enter_function: entry to ‘httpAddrListen’
cups-2.4.16/cups/http-addr.c:169:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/http-addr.c:176:3: branch_false: ...to here
cups-2.4.16/cups/http-addr.c:182:13: acquire_resource: stream socket created here
cups-2.4.16/cups/http-addr.c:182:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/cups/http-addr.c:188:3: branch_false: ...to here
cups-2.4.16/cups/http-addr.c:221:8: branch_true: following ‘true’ branch (when ‘status == 0’)...
cups-2.4.16/cups/http-addr.c:225:14: branch_true: ...to here
cups-2.4.16/cups/http-addr.c:228:66: call_function: calling ‘httpAddrLength’ from ‘httpAddrListen’
cups-2.4.16/cups/http-addr.c:228:66: return_function: returning to ‘httpAddrListen’ from ‘httpAddrLength’
cups-2.4.16/cups/http-addr.c:245:6: branch_false: following ‘false’ branch (when ‘status == 0’)...
cups-2.4.16/cups/http-addr.c:258:7: branch_false: ...to here
cups-2.4.16/cups/http-addr.c:258:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/http-addr.c:272:22: branch_false: ...to here
cups-2.4.16/cups/http-addr.c:272:22: throw: if ‘fcntl’ throws an exception...
cups-2.4.16/cups/http-addr.c:272:22: danger: ‘fd’ leaks here
#  270|   
#  271|   #ifndef _WIN32
#  272|->   fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
#  273|   #endif /* !_WIN32 */
#  274|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
cups-2.4.16/cups/http-addrlist.c:922:11: warning[-Wanalyzer-malloc-leak]: leak of ‘first’
cups-2.4.16/cups/http-addrlist.c:583:37: acquire_memory: allocated here
cups-2.4.16/cups/http-addrlist.c:583:8: branch_false: following ‘false’ branch (when ‘first’ is NULL)...
cups-2.4.16/cups/http-addrlist.c:840:7: branch_false: ...to here
cups-2.4.16/cups/http-addrlist.c:840:16: branch_true: following ‘true’ branch...
cups-2.4.16/cups/http-addrlist.c:850:8: branch_true: ...to here
cups-2.4.16/cups/http-addrlist.c:874:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/http-addrlist.c:884:10: branch_true: following ‘true’ branch (when ‘family != 2’)...
cups-2.4.16/cups/http-addrlist.c:890:35: branch_true: ...to here
cups-2.4.16/cups/http-addrlist.c:890:35: acquire_memory: allocated here
cups-2.4.16/cups/http-addrlist.c:891:12: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/cups/http-addrlist.c:898:9: branch_false: ...to here
cups-2.4.16/cups/http-addrlist.c:906:12: branch_true: following ‘true’ branch (when ‘first’ is NULL)...
cups-2.4.16/cups/http-addrlist.c:906:12: branch_true: ...to here
cups-2.4.16/cups/http-addrlist.c:912:10: branch_true: following ‘true’ branch (when ‘family != 10’)...
cups-2.4.16/cups/http-addrlist.c:919:35: branch_true: ...to here
cups-2.4.16/cups/http-addrlist.c:920:12: branch_true: following ‘true’ branch (when ‘temp’ is NULL)...
cups-2.4.16/cups/http-addrlist.c:922:61: branch_true: ...to here
cups-2.4.16/cups/http-addrlist.c:922:11: throw: if ‘_cupsSetError’ throws an exception...
cups-2.4.16/cups/http-addrlist.c:922:11: danger: ‘first’ leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9)
#  920|   	if (!temp)
#  921|   	{
#  922|-> 	  _cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(errno), 0);
#  923|   	  httpAddrFreeList(first);
#  924|   	  return (NULL);

Error: COMPILER_WARNING (CWE-704): [#def142]
cups-2.4.16/cups/http-support.c: scope_hint: In function ‘httpAssembleURI’
cups-2.4.16/cups/http-support.c:378:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  378 |     query = strchr(resource, '?');
#      |           ^
#  376|       */
#  377|   
#  378|->     query = strchr(resource, '?');
#  379|       ptr   = http_copy_encode(ptr, resource, end, NULL, "?",
#  380|                                encoding & HTTP_URI_CODING_RESOURCE);

Error: COMPILER_WARNING (CWE-704): [#def143]
cups-2.4.16/cups/http-support.c:378:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  376|       */
#  377|   
#  378|->     query = strchr(resource, '?');
#  379|       ptr   = http_copy_encode(ptr, resource, end, NULL, "?",
#  380|                                encoding & HTTP_URI_CODING_RESOURCE);

Error: COMPILER_WARNING (CWE-704): [#def144]
cups-2.4.16/cups/http.c: scope_hint: In function ‘http_add_field’
cups-2.4.16/cups/http.c:3636:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 3636 |     char *ptr = strchr(value, ':');
#      |                 ^~~~~~
# 3634|       */
# 3635|   
# 3636|->     char *ptr = strchr(value, ':');
# 3637|   
# 3638|       if (value[0] != '[' && ptr && strchr(ptr + 1, ':'))

Error: COMPILER_WARNING (CWE-704): [#def145]
cups-2.4.16/cups/http.c:3636:17: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 3634|       */
# 3635|   
# 3636|->     char *ptr = strchr(value, ':');
# 3637|   
# 3638|       if (value[0] != '[' && ptr && strchr(ptr + 1, ':'))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
cups-2.4.16/cups/ipp.c:2664:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/cups/ipp.c:5952:1: enter_function: entry to ‘ipp_read_io’
cups-2.4.16/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.16/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.16/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.16/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.16/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.16/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6120:20: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.16/cups/ipp.c:6262:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6262:19: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.16/cups/ipp.c:6294:13: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6543:37: call_function: calling ‘ippNew’ from ‘ipp_read_io’
# 2662|   
# 2663|       if (cg->server_version == 0)
# 2664|->       _cupsSetDefaults();
# 2665|   
# 2666|       temp->request.any.version[0] = (ipp_uchar_t)(cg->server_version / 10);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
cups-2.4.16/cups/ipp.c:5486:20: warning[-Wanalyzer-malloc-leak]: leak of ‘attr’
cups-2.4.16/cups/ipp.c:5462:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:5469:6: branch_false: ...to here
cups-2.4.16/cups/ipp.c:5474:10: acquire_memory: allocated here
cups-2.4.16/cups/ipp.c:5477:6: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.16/cups/ipp.c:5485:8: branch_true: ...to here
cups-2.4.16/cups/ipp.c:5485:8: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
cups-2.4.16/cups/ipp.c:5486:20: branch_true: ...to here
cups-2.4.16/cups/ipp.c:5486:20: throw: if ‘_cupsStrAlloc’ throws an exception...
cups-2.4.16/cups/ipp.c:5486:20: danger: ‘attr’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 5484|   
# 5485|       if (name)
# 5486|->       attr->name = _cupsStrAlloc(name);
# 5487|   
# 5488|       attr->group_tag  = group_tag;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def148]
cups-2.4.16/cups/ipp.c:6339:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘attr’
cups-2.4.16/cups/ipp.c:5965:26: release_memory: ‘attr’ is NULL
cups-2.4.16/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.16/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.16/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.16/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.16/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.16/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6120:20: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.16/cups/ipp.c:6262:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6262:19: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.16/cups/ipp.c:6294:13: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6294:13: release_memory: ‘attr’ is NULL
cups-2.4.16/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6319:20: branch_false: following ‘false’ branch (when ‘n == 4’)...
cups-2.4.16/cups/ipp.c:6331:21: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6331:20: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6337:22: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6339:25: release_memory: ‘attr’ is NULL
cups-2.4.16/cups/ipp.c:6339:21: danger: dereference of NULL ‘attr’
# 6337|   		n = (buffer[0] << 24) | (buffer[1] << 16) | (buffer[2] << 8) | buffer[3];
# 6338|   
# 6339|->                 if (attr->value_tag == IPP_TAG_RANGE)
# 6340|                     value->range.lower = value->range.upper = n;
# 6341|                   else

Error: GCC_ANALYZER_WARNING (CWE-476): [#def149]
cups-2.4.16/cups/ipp.c:6360:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘value’
cups-2.4.16/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.16/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.16/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.16/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.16/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.16/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6120:20: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.16/cups/ipp.c:6262:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6262:19: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.16/cups/ipp.c:6294:13: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6346:20: branch_false: following ‘false’ branch (when ‘n == 1’)...
cups-2.4.16/cups/ipp.c:6354:21: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6354:20: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6360:40: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6360:17: danger: dereference of NULL ‘value’
# 6358|   		}
# 6359|   
# 6360|->                 value->boolean = (char)buffer[0];
# 6361|   	        break;
# 6362|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def150]
cups-2.4.16/cups/ipp.c:6376:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘attr’
cups-2.4.16/cups/ipp.c:5965:26: release_memory: ‘attr’ is NULL
cups-2.4.16/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.16/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.16/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.16/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.16/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.16/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6120:20: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.16/cups/ipp.c:6262:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6262:19: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.16/cups/ipp.c:6294:13: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6294:13: release_memory: ‘attr’ is NULL
cups-2.4.16/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6376:25: release_memory: ‘attr’ is NULL
cups-2.4.16/cups/ipp.c:6376:21: danger: dereference of NULL ‘attr’
# 6374|   		*/
# 6375|   
# 6376|-> 	        if (attr->value_tag == tag)
# 6377|   		{
# 6378|   		  if (n == 0)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def151]
cups-2.4.16/cups/ipp.c:6543:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘value’
cups-2.4.16/cups/ipp.c:5952:1: enter_function: entry to ‘ipp_read_io’
cups-2.4.16/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.16/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.16/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.16/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.16/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.16/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6120:20: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.16/cups/ipp.c:6262:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6262:19: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.16/cups/ipp.c:6294:13: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6543:37: call_function: calling ‘ippNew’ from ‘ipp_read_io’
cups-2.4.16/cups/ipp.c:6543:37: return_function: returning to ‘ipp_read_io’ from ‘ippNew’
cups-2.4.16/cups/ipp.c:6543:17: danger: dereference of NULL ‘value’
# 6541|   		*/
# 6542|   
# 6543|->                 value->collection = ippNew();
# 6544|   
# 6545|                   if (n > 0)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def152]
cups-2.4.16/cups/ipp.c:6699:37: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.16/cups/ipp.c:6698:3: acquire_resource: ‘va_start’ called here
cups-2.4.16/cups/ipp.c:6699:37: throw: if ‘_cupsLangString’ throws an exception...
cups-2.4.16/cups/ipp.c:6699:37: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 6697|   
# 6698|     va_start(ap, format);
# 6699|->   vsnprintf(buffer, sizeof(buffer), _cupsLangString(lang, format), ap);
# 6700|     va_end(ap);
# 6701|   

Error: GCC_ANALYZER_WARNING (CWE-465): [#def153]
cups-2.4.16/cups/ipp.c:6759:6: warning[-Wanalyzer-deref-before-check]: check of ‘temp’ for NULL after already dereferencing it
cups-2.4.16/cups/ipp.c:6734:6: branch_false: following ‘false’ branch (when ‘alloc_values <= element’)...
cups-2.4.16/cups/ipp.c:6747:6: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6759:6: danger: pointer ‘temp’ is checked for NULL here but it was already dereferenced at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 6757|     */
# 6758|   
# 6759|->   if ((temp = realloc(temp, sizeof(ipp_attribute_t) + (size_t)(alloc_values - 1) * sizeof(_ipp_value_t))) == NULL)
# 6760|     {
# 6761|       _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Unable to reallocate IPP attribute value."), 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
cups-2.4.16/cups/ipp.c:6808:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attr’
cups-2.4.16/cups/ipp.c:5952:1: enter_function: entry to ‘ipp_read_io’
cups-2.4.16/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.16/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.16/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.16/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.16/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.16/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6120:19: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ipp.c:6126:16: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6133:13: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6225:26: call_function: calling ‘ipp_set_value’ from ‘ipp_read_io’
# 6806|   
# 6807|   	*attr = temp;
# 6808|-> 	_cupsSetError(IPP_STATUS_ERROR_INTERNAL,
# 6809|   	              _("IPP attribute is not a member of the message."), 1);
# 6810|   	DEBUG_puts("4ipp_set_value: Unable to find attribute in message.");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
cups-2.4.16/cups/ipp.c:6836:10: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/cups/ipp.c:5952:1: enter_function: entry to ‘ipp_read_io’
cups-2.4.16/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.16/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.16/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.16/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.16/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.16/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6126:16: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6133:13: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6225:16: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6298:15: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.16/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6543:37: call_function: calling ‘ippNew’ from ‘ipp_read_io’
cups-2.4.16/cups/ipp.c:6543:37: return_function: returning to ‘ipp_read_io’ from ‘ippNew’
cups-2.4.16/cups/ipp.c:6545:20: branch_false: following ‘false’ branch (when ‘n == 0’)...
cups-2.4.16/cups/ipp.c:6554:21: branch_false: ...to here
cups-2.4.16/cups/ipp.c:6554:21: call_function: calling ‘ipp_read_io’ from ‘ipp_read_io’
# 6834|       temp->num_values = element + 1;
# 6835|   
# 6836|->   return (temp->values + element);
# 6837|   }
# 6838|   

Error: GCC_ANALYZER_WARNING (CWE-404): [#def156]
cups-2.4.16/cups/langprintf.c:123:3: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.16/cups/langprintf.c:110:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/langprintf.c:113:8: branch_false: ...to here
cups-2.4.16/cups/langprintf.c:122:3: acquire_resource: ‘va_start’ called here
cups-2.4.16/cups/langprintf.c:123:3: throw: if ‘_cupsLangString’ throws an exception...
cups-2.4.16/cups/langprintf.c:123:3: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  121|   
#  122|     va_start(ap, message);
#  123|->   snprintf(temp, sizeof(temp), "%s: %s\n", prefix,
#  124|   	   _cupsLangString(cg->lang_default, message));
#  125|     vsnprintf(buffer, sizeof(buffer), temp, ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def157]
cups-2.4.16/cups/langprintf.c:180:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.16/cups/langprintf.c:166:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/langprintf.c:169:8: branch_false: ...to here
cups-2.4.16/cups/langprintf.c:178:3: acquire_resource: ‘va_start’ called here
cups-2.4.16/cups/langprintf.c:180:13: throw: if ‘_cupsLangString’ throws an exception...
cups-2.4.16/cups/langprintf.c:180:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  178|     va_start(ap, message);
#  179|     vsnprintf(buffer, sizeof(buffer) - 1,
#  180|-> 	    _cupsLangString(cg->lang_default, message), ap);
#  181|     va_end(ap);
#  182|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def158]
cups-2.4.16/cups/language.c:957:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/cups/language.c:915:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:925:13: branch_false: ...to here
cups-2.4.16/cups/language.c:925:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:932:7: branch_false: ...to here
cups-2.4.16/cups/language.c:932:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:932:6: branch_false: ...to here
cups-2.4.16/cups/language.c:957:12: branch_true: following ‘true’ branch...
cups-2.4.16/cups/language.c:963:11: branch_true: ...to here
cups-2.4.16/cups/language.c:979:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/cups/language.c:982:7: branch_false: ...to here
cups-2.4.16/cups/language.c:1001:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
cups-2.4.16/cups/language.c:1024:37: branch_false: ...to here
cups-2.4.16/cups/language.c:1024:12: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
cups-2.4.16/cups/language.c:1027:23: branch_false: ...to here
cups-2.4.16/cups/language.c:1027:23: acquire_memory: allocated here
cups-2.4.16/cups/language.c:1027:12: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:1027:12: branch_false: ...to here
cups-2.4.16/cups/language.c:957:12: throw: if ‘cupsFileGets’ throws an exception...
cups-2.4.16/cups/language.c:957:12: danger: ‘<unknown>’ leaks here; was allocated at [(16)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/15)
#  955|       m = NULL;
#  956|   
#  957|->     while (cupsFileGets(fp, s, sizeof(s)) != NULL)
#  958|       {
#  959|        /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def159]
cups-2.4.16/cups/language.c:957:12: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
cups-2.4.16/cups/language.c:915:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:925:13: branch_false: ...to here
cups-2.4.16/cups/language.c:925:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:932:7: branch_false: ...to here
cups-2.4.16/cups/language.c:932:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:932:6: branch_false: ...to here
cups-2.4.16/cups/language.c:957:12: branch_true: following ‘true’ branch...
cups-2.4.16/cups/language.c:963:11: branch_true: ...to here
cups-2.4.16/cups/language.c:979:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/cups/language.c:982:7: branch_false: ...to here
cups-2.4.16/cups/language.c:1001:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
cups-2.4.16/cups/language.c:1024:37: branch_false: ...to here
cups-2.4.16/cups/language.c:1024:37: acquire_memory: allocated here
cups-2.4.16/cups/language.c:1024:12: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
cups-2.4.16/cups/language.c:1027:23: branch_false: ...to here
cups-2.4.16/cups/language.c:1027:12: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:1027:12: branch_false: ...to here
cups-2.4.16/cups/language.c:957:12: throw: if ‘cupsFileGets’ throws an exception...
cups-2.4.16/cups/language.c:957:12: danger: ‘m’ leaks here; was allocated at [(14)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/13)
#  955|       m = NULL;
#  956|   
#  957|->     while (cupsFileGets(fp, s, sizeof(s)) != NULL)
#  958|       {
#  959|        /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def160]
cups-2.4.16/cups/language.c:1005:13: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
cups-2.4.16/cups/language.c:915:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:925:13: branch_false: ...to here
cups-2.4.16/cups/language.c:925:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:932:7: branch_false: ...to here
cups-2.4.16/cups/language.c:932:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:932:6: branch_false: ...to here
cups-2.4.16/cups/language.c:957:12: branch_true: following ‘true’ branch...
cups-2.4.16/cups/language.c:963:11: branch_true: ...to here
cups-2.4.16/cups/language.c:979:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/cups/language.c:982:7: branch_false: ...to here
cups-2.4.16/cups/language.c:1001:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
cups-2.4.16/cups/language.c:1024:37: branch_false: ...to here
cups-2.4.16/cups/language.c:1024:37: acquire_memory: allocated here
cups-2.4.16/cups/language.c:1024:12: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
cups-2.4.16/cups/language.c:1027:23: branch_false: ...to here
cups-2.4.16/cups/language.c:1027:12: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:1027:12: branch_false: ...to here
cups-2.4.16/cups/language.c:957:12: branch_true: following ‘true’ branch...
cups-2.4.16/cups/language.c:963:11: branch_true: ...to here
cups-2.4.16/cups/language.c:963:10: branch_false: following ‘false’ branch...
cups-2.4.16/cups/language.c:970:18: branch_false: ...to here
cups-2.4.16/cups/language.c:970:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/cups/language.c:973:7: branch_false: ...to here
cups-2.4.16/cups/language.c:979:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/cups/language.c:982:7: branch_false: ...to here
cups-2.4.16/cups/language.c:995:10: branch_true: following ‘true’ branch...
cups-2.4.16/cups/language.c:1001:12: branch_true: ...to here
cups-2.4.16/cups/language.c:1001:12: branch_true: following ‘true’ branch (when ‘m’ is non-NULL)...
cups-2.4.16/cups/language.c:1003:15: branch_true: ...to here
cups-2.4.16/cups/language.c:1003:14: branch_true: following ‘true’ branch...
cups-2.4.16/cups/language.c:1003:26: branch_true: ...to here
cups-2.4.16/cups/language.c:1005:13: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/cups/language.c:1005:13: danger: ‘m’ leaks here; was allocated at [(14)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/13)
# 1003|   	  if (m->str && (m->str[0] || (flags & _CUPS_MESSAGE_EMPTY)))
# 1004|   	  {
# 1005|-> 	    cupsArrayAdd(a, m);
# 1006|   	  }
# 1007|   	  else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def161]
cups-2.4.16/cups/ppd-cache.c:5498:22: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
cups-2.4.16/cups/ppd-cache.c:5495:33: acquire_memory: allocated here
cups-2.4.16/cups/ppd-cache.c:5495:6: branch_true: following ‘true’ branch (when ‘f’ is non-NULL)...
cups-2.4.16/cups/ppd-cache.c:5497:5: branch_true: ...to here
cups-2.4.16/cups/ppd-cache.c:5498:22: throw: if ‘cupsAddOption’ throws an exception...
cups-2.4.16/cups/ppd-cache.c:5498:22: danger: ‘f’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 5496|     {
# 5497|       f->value       = template;
# 5498|->     f->num_options = cupsAddOption(name, value, 0, &f->options);
# 5499|   
# 5500|       cupsArrayAdd(finishings, f);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def162]
cups-2.4.16/cups/ppd-cache.c:5521:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/cups/ppd-cache.c:5517:6: branch_true: following ‘true’ branch (when ‘m’ is non-NULL)...
cups-2.4.16/cups/ppd-cache.c:5519:14: branch_true: ...to here
cups-2.4.16/cups/ppd-cache.c:5519:14: acquire_memory: allocated here
cups-2.4.16/cups/ppd-cache.c:5521:5: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/cups/ppd-cache.c:5521:5: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 5519|       m->msg = strdup(msg);
# 5520|       m->str = strdup(str);
# 5521|->     cupsArrayAdd(a, m);
# 5522|     }
# 5523|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def163]
cups-2.4.16/cups/ppd-cache.c:5521:5: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
cups-2.4.16/cups/ppd-cache.c:5517:12: acquire_memory: allocated here
cups-2.4.16/cups/ppd-cache.c:5517:6: branch_true: following ‘true’ branch (when ‘m’ is non-NULL)...
cups-2.4.16/cups/ppd-cache.c:5519:14: branch_true: ...to here
cups-2.4.16/cups/ppd-cache.c:5521:5: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/cups/ppd-cache.c:5521:5: danger: ‘m’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 5519|       m->msg = strdup(msg);
# 5520|       m->str = strdup(str);
# 5521|->     cupsArrayAdd(a, m);
# 5522|     }
# 5523|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def164]
cups-2.4.16/cups/ppd-conflicts.c:687:12: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:700:1: enter_function: entry to ‘ppd_load_constraints’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_false: following ‘false’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:739:8: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:791:33: call_function: calling ‘ppd_is_installable’ from ‘ppd_load_constraints’
#  685|            i > 0;
#  686|   	 i --, option ++)
#  687|->       if (!_cups_strcasecmp(option->keyword, name))
#  688|           return (1);
#  689|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def165]
cups-2.4.16/cups/ppd-conflicts.c:687:12: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:700:1: enter_function: entry to ‘ppd_load_constraints’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_false: following ‘false’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:739:8: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:791:33: call_function: calling ‘ppd_is_installable’ from ‘ppd_load_constraints’
#  685|            i > 0;
#  686|   	 i --, option ++)
#  687|->       if (!_cups_strcasecmp(option->keyword, name))
#  688|           return (1);
#  689|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
cups-2.4.16/cups/ppd-conflicts.c:779:10: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:727:8: branch_false: following ‘false’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_false: following ‘false’ branch (when ‘i == 1’)...
cups-2.4.16/cups/ppd-conflicts.c:757:19: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:10: throw: if ‘_cups_strncasecmp’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:779:10: danger: ‘constptr’ leaks here; was allocated at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
#  777|       consts->constraints     = constptr;
#  778|   
#  779|->     if (!_cups_strncasecmp(oldconst->option1, "Custom", 6) &&
#  780|   	!_cups_strcasecmp(oldconst->choice1, "True"))
#  781|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def167]
cups-2.4.16/cups/ppd-conflicts.c:779:10: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:727:8: branch_false: following ‘false’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_false: following ‘false’ branch (when ‘i == 1’)...
cups-2.4.16/cups/ppd-conflicts.c:757:19: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:10: throw: if ‘_cups_strncasecmp’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:779:10: danger: ‘consts’ leaks here; was allocated at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  777|       consts->constraints     = constptr;
#  778|   
#  779|->     if (!_cups_strncasecmp(oldconst->option1, "Custom", 6) &&
#  780|   	!_cups_strcasecmp(oldconst->choice1, "True"))
#  781|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def168]
cups-2.4.16/cups/ppd-conflicts.c:780:10: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:780:10: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:780:10: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  778|   
#  779|       if (!_cups_strncasecmp(oldconst->option1, "Custom", 6) &&
#  780|-> 	!_cups_strcasecmp(oldconst->choice1, "True"))
#  781|       {
#  782|         constptr[0].option      = ppdFindOption(ppd, oldconst->option1 + 6);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def169]
cups-2.4.16/cups/ppd-conflicts.c:780:10: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:780:10: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:780:10: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  778|   
#  779|       if (!_cups_strncasecmp(oldconst->option1, "Custom", 6) &&
#  780|-> 	!_cups_strcasecmp(oldconst->choice1, "True"))
#  781|       {
#  782|         constptr[0].option      = ppdFindOption(ppd, oldconst->option1 + 6);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def170]
cups-2.4.16/cups/ppd-conflicts.c:782:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:9: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:782:33: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:782:33: throw: if ‘ppdFindOption’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:782:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  780|   	!_cups_strcasecmp(oldconst->choice1, "True"))
#  781|       {
#  782|->       constptr[0].option      = ppdFindOption(ppd, oldconst->option1 + 6);
#  783|         constptr[0].choice      = ppdFindChoice(constptr[0].option, "Custom");
#  784|         constptr[0].installable = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def171]
cups-2.4.16/cups/ppd-conflicts.c:782:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:9: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:782:33: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:782:33: throw: if ‘ppdFindOption’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:782:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  780|   	!_cups_strcasecmp(oldconst->choice1, "True"))
#  781|       {
#  782|->       constptr[0].option      = ppdFindOption(ppd, oldconst->option1 + 6);
#  783|         constptr[0].choice      = ppdFindChoice(constptr[0].option, "Custom");
#  784|         constptr[0].installable = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
cups-2.4.16/cups/ppd-conflicts.c:783:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:9: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:782:33: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:783:33: throw: if ‘ppdFindChoice’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:783:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  781|       {
#  782|         constptr[0].option      = ppdFindOption(ppd, oldconst->option1 + 6);
#  783|->       constptr[0].choice      = ppdFindChoice(constptr[0].option, "Custom");
#  784|         constptr[0].installable = 0;
#  785|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def173]
cups-2.4.16/cups/ppd-conflicts.c:783:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:779:9: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:782:33: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:783:33: throw: if ‘ppdFindChoice’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:783:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  781|       {
#  782|         constptr[0].option      = ppdFindOption(ppd, oldconst->option1 + 6);
#  783|->       constptr[0].choice      = ppdFindChoice(constptr[0].option, "Custom");
#  784|         constptr[0].installable = 0;
#  785|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def174]
cups-2.4.16/cups/ppd-conflicts.c:788:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:788:33: throw: if ‘ppdFindOption’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:788:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  786|       else
#  787|       {
#  788|->       constptr[0].option      = ppdFindOption(ppd, oldconst->option1);
#  789|         constptr[0].choice      = ppdFindChoice(constptr[0].option,
#  790|   					      oldconst->choice1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def175]
cups-2.4.16/cups/ppd-conflicts.c:788:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:788:33: throw: if ‘ppdFindOption’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:788:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  786|       else
#  787|       {
#  788|->       constptr[0].option      = ppdFindOption(ppd, oldconst->option1);
#  789|         constptr[0].choice      = ppdFindChoice(constptr[0].option,
#  790|   					      oldconst->choice1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def176]
cups-2.4.16/cups/ppd-conflicts.c:789:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:789:33: throw: if ‘ppdFindChoice’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:789:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/6)
#  787|       {
#  788|         constptr[0].option      = ppdFindOption(ppd, oldconst->option1);
#  789|->       constptr[0].choice      = ppdFindChoice(constptr[0].option,
#  790|   					      oldconst->choice1);
#  791|         constptr[0].installable = ppd_is_installable(installable,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def177]
cups-2.4.16/cups/ppd-conflicts.c:789:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:789:33: throw: if ‘ppdFindChoice’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:789:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  787|       {
#  788|         constptr[0].option      = ppdFindOption(ppd, oldconst->option1);
#  789|->       constptr[0].choice      = ppdFindChoice(constptr[0].option,
#  790|   					      oldconst->choice1);
#  791|         constptr[0].installable = ppd_is_installable(installable,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
cups-2.4.16/cups/ppd-conflicts.c:804:10: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:10: throw: if ‘_cups_strncasecmp’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:804:10: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/6)
#  802|       }
#  803|   
#  804|->     if (!_cups_strncasecmp(oldconst->option2, "Custom", 6) &&
#  805|   	!_cups_strcasecmp(oldconst->choice2, "True"))
#  806|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def179]
cups-2.4.16/cups/ppd-conflicts.c:804:10: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:10: throw: if ‘_cups_strncasecmp’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:804:10: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
#  802|       }
#  803|   
#  804|->     if (!_cups_strncasecmp(oldconst->option2, "Custom", 6) &&
#  805|   	!_cups_strcasecmp(oldconst->choice2, "True"))
#  806|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
cups-2.4.16/cups/ppd-conflicts.c:805:10: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:805:10: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:805:10: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
#  803|   
#  804|       if (!_cups_strncasecmp(oldconst->option2, "Custom", 6) &&
#  805|-> 	!_cups_strcasecmp(oldconst->choice2, "True"))
#  806|       {
#  807|         constptr[1].option      = ppdFindOption(ppd, oldconst->option2 + 6);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def181]
cups-2.4.16/cups/ppd-conflicts.c:805:10: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:805:10: throw: if ‘_cups_strcasecmp’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:805:10: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/4)
#  803|   
#  804|       if (!_cups_strncasecmp(oldconst->option2, "Custom", 6) &&
#  805|-> 	!_cups_strcasecmp(oldconst->choice2, "True"))
#  806|       {
#  807|         constptr[1].option      = ppdFindOption(ppd, oldconst->option2 + 6);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def182]
cups-2.4.16/cups/ppd-conflicts.c:807:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:9: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:807:33: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:807:33: throw: if ‘ppdFindOption’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:807:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
#  805|   	!_cups_strcasecmp(oldconst->choice2, "True"))
#  806|       {
#  807|->       constptr[1].option      = ppdFindOption(ppd, oldconst->option2 + 6);
#  808|         constptr[1].choice      = ppdFindChoice(constptr[1].option, "Custom");
#  809|         constptr[1].installable = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def183]
cups-2.4.16/cups/ppd-conflicts.c:807:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:9: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:807:33: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:807:33: throw: if ‘ppdFindOption’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:807:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4)
#  805|   	!_cups_strcasecmp(oldconst->choice2, "True"))
#  806|       {
#  807|->       constptr[1].option      = ppdFindOption(ppd, oldconst->option2 + 6);
#  808|         constptr[1].choice      = ppdFindChoice(constptr[1].option, "Custom");
#  809|         constptr[1].installable = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
cups-2.4.16/cups/ppd-conflicts.c:808:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:9: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:807:33: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:808:33: throw: if ‘ppdFindChoice’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:808:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/6)
#  806|       {
#  807|         constptr[1].option      = ppdFindOption(ppd, oldconst->option2 + 6);
#  808|->       constptr[1].choice      = ppdFindChoice(constptr[1].option, "Custom");
#  809|         constptr[1].installable = 0;
#  810|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def185]
cups-2.4.16/cups/ppd-conflicts.c:808:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:804:9: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-conflicts.c:807:33: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:808:33: throw: if ‘ppdFindChoice’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:808:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/4)
#  806|       {
#  807|         constptr[1].option      = ppdFindOption(ppd, oldconst->option2 + 6);
#  808|->       constptr[1].choice      = ppdFindChoice(constptr[1].option, "Custom");
#  809|         constptr[1].installable = 0;
#  810|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
cups-2.4.16/cups/ppd-conflicts.c:813:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:813:33: throw: if ‘ppdFindOption’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:813:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/6)
#  811|       else
#  812|       {
#  813|->       constptr[1].option      = ppdFindOption(ppd, oldconst->option2);
#  814|         constptr[1].choice      = ppdFindChoice(constptr[1].option,
#  815|   					      oldconst->choice2);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
cups-2.4.16/cups/ppd-conflicts.c:813:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:813:33: throw: if ‘ppdFindOption’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:813:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
#  811|       else
#  812|       {
#  813|->       constptr[1].option      = ppdFindOption(ppd, oldconst->option2);
#  814|         constptr[1].choice      = ppdFindChoice(constptr[1].option,
#  815|   					      oldconst->choice2);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
cups-2.4.16/cups/ppd-conflicts.c:814:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:814:33: throw: if ‘ppdFindChoice’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:814:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/6)
#  812|       {
#  813|         constptr[1].option      = ppdFindOption(ppd, oldconst->option2);
#  814|->       constptr[1].choice      = ppdFindChoice(constptr[1].option,
#  815|   					      oldconst->choice2);
#  816|         constptr[1].installable = ppd_is_installable(installable,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def189]
cups-2.4.16/cups/ppd-conflicts.c:814:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:814:33: throw: if ‘ppdFindChoice’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:814:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/4)
#  812|       {
#  813|         constptr[1].option      = ppdFindOption(ppd, oldconst->option2);
#  814|->       constptr[1].choice      = ppdFindChoice(constptr[1].option,
#  815|   					      oldconst->choice2);
#  816|         constptr[1].installable = ppd_is_installable(installable,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def190]
cups-2.4.16/cups/ppd-conflicts.c:835:5: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:820:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:820:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:829:27: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:835:5: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:835:5: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/6)
#  833|       */
#  834|   
#  835|->     cupsArrayAdd(ppd->cups_uiconstraints, consts);
#  836|     }
#  837|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def191]
cups-2.4.16/cups/ppd-conflicts.c:835:5: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
cups-2.4.16/cups/ppd-conflicts.c:732:6: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.16/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.16/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.16/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.16/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:820:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:820:34: branch_false: ...to here
cups-2.4.16/cups/ppd-conflicts.c:829:27: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-conflicts.c:835:5: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/cups/ppd-conflicts.c:835:5: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/4)
#  833|       */
#  834|   
#  835|->     cupsArrayAdd(ppd->cups_uiconstraints, consts);
#  836|     }
#  837|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
cups-2.4.16/cups/ppd-emit.c:109:32: warning[-Wanalyzer-malloc-leak]: leak of ‘collect’
cups-2.4.16/cups/ppd-emit.c:102:18: acquire_memory: allocated here
cups-2.4.16/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:109:32: throw: if ‘cupsArrayCount’ throws an exception...
cups-2.4.16/cups/ppd-emit.c:109:32: danger: ‘collect’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  107|     }
#  108|   
#  109|->   if ((orders = calloc((size_t)cupsArrayCount(ppd->marked), sizeof(float))) == NULL)
#  110|     {
#  111|       *choices = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
cups-2.4.16/cups/ppd-emit.c:120:28: warning[-Wanalyzer-malloc-leak]: leak of ‘collect’
cups-2.4.16/cups/ppd-emit.c:102:18: acquire_memory: allocated here
cups-2.4.16/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:120:28: throw: if ‘cupsArrayFirst’ throws an exception...
cups-2.4.16/cups/ppd-emit.c:120:28: danger: ‘collect’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  118|     */
#  119|   
#  120|->   for (c = (ppd_choice_t *)cupsArrayFirst(ppd->marked);
#  121|          c;
#  122|          c = (ppd_choice_t *)cupsArrayNext(ppd->marked))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
cups-2.4.16/cups/ppd-emit.c:120:28: warning[-Wanalyzer-malloc-leak]: leak of ‘orders’
cups-2.4.16/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:109:17: acquire_memory: allocated here
cups-2.4.16/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:120:28: throw: if ‘cupsArrayFirst’ throws an exception...
cups-2.4.16/cups/ppd-emit.c:120:28: danger: ‘orders’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  118|     */
#  119|   
#  120|->   for (c = (ppd_choice_t *)cupsArrayFirst(ppd->marked);
#  121|          c;
#  122|          c = (ppd_choice_t *)cupsArrayNext(ppd->marked))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
cups-2.4.16/cups/ppd-emit.c:122:28: warning[-Wanalyzer-malloc-leak]: leak of ‘collect’
cups-2.4.16/cups/ppd-emit.c:102:18: acquire_memory: allocated here
cups-2.4.16/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:169:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-emit.c:122:28: throw: if ‘cupsArrayNext’ throws an exception...
cups-2.4.16/cups/ppd-emit.c:122:28: danger: ‘collect’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
#  120|     for (c = (ppd_choice_t *)cupsArrayFirst(ppd->marked);
#  121|          c;
#  122|->        c = (ppd_choice_t *)cupsArrayNext(ppd->marked))
#  123|     {
#  124|       csection = c->option->section;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def196]
cups-2.4.16/cups/ppd-emit.c:122:28: warning[-Wanalyzer-malloc-leak]: leak of ‘orders’
cups-2.4.16/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:109:17: acquire_memory: allocated here
cups-2.4.16/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:169:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-emit.c:122:28: throw: if ‘cupsArrayNext’ throws an exception...
cups-2.4.16/cups/ppd-emit.c:122:28: danger: ‘orders’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#  120|     for (c = (ppd_choice_t *)cupsArrayFirst(ppd->marked);
#  121|          c;
#  122|->        c = (ppd_choice_t *)cupsArrayNext(ppd->marked))
#  123|     {
#  124|       csection = c->option->section;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def197]
cups-2.4.16/cups/ppd-emit.c:137:19: warning[-Wanalyzer-malloc-leak]: leak of ‘collect’
cups-2.4.16/cups/ppd-emit.c:102:18: acquire_memory: allocated here
cups-2.4.16/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:127:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/cups/ppd-emit.c:137:19: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:137:19: throw: if ‘ppdFindAttr’ throws an exception...
cups-2.4.16/cups/ppd-emit.c:137:19: danger: ‘collect’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
#  135|   
#  136|   
#  137|->       for (attr = ppdFindAttr(ppd, "NonUIOrderDependency", NULL);
#  138|              attr;
#  139|   	   attr = ppdFindNextAttr(ppd, "NonUIOrderDependency", NULL))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def198]
cups-2.4.16/cups/ppd-emit.c:137:19: warning[-Wanalyzer-malloc-leak]: leak of ‘orders’
cups-2.4.16/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:109:17: acquire_memory: allocated here
cups-2.4.16/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:127:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/cups/ppd-emit.c:137:19: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:137:19: throw: if ‘ppdFindAttr’ throws an exception...
cups-2.4.16/cups/ppd-emit.c:137:19: danger: ‘orders’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  135|   
#  136|   
#  137|->       for (attr = ppdFindAttr(ppd, "NonUIOrderDependency", NULL);
#  138|              attr;
#  139|   	   attr = ppdFindNextAttr(ppd, "NonUIOrderDependency", NULL))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def199]
cups-2.4.16/cups/ppd-emit.c:139:19: warning[-Wanalyzer-malloc-leak]: leak of ‘collect’
cups-2.4.16/cups/ppd-emit.c:102:18: acquire_memory: allocated here
cups-2.4.16/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:127:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/cups/ppd-emit.c:137:19: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:138:12: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:140:13: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:140:12: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-emit.c:141:13: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:140:13: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-emit.c:143:14: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:140:13: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-emit.c:144:32: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:140:13: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/cups/ppd-emit.c:144:56: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:140:13: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.16/cups/ppd-emit.c:139:19: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:139:19: throw: if ‘ppdFindNextAttr’ throws an exception...
cups-2.4.16/cups/ppd-emit.c:139:19: danger: ‘collect’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
#  137|         for (attr = ppdFindAttr(ppd, "NonUIOrderDependency", NULL);
#  138|              attr;
#  139|-> 	   attr = ppdFindNextAttr(ppd, "NonUIOrderDependency", NULL))
#  140|           if (attr->value &&
#  141|   	    sscanf(attr->value, "%f%16s%41s%40s", &aorder, asection, amain,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def200]
cups-2.4.16/cups/ppd-emit.c:139:19: warning[-Wanalyzer-malloc-leak]: leak of ‘orders’
cups-2.4.16/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:109:17: acquire_memory: allocated here
cups-2.4.16/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:127:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/cups/ppd-emit.c:137:19: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:138:12: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.16/cups/ppd-emit.c:140:13: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:140:12: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-emit.c:141:13: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:140:13: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-emit.c:143:14: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:140:13: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-emit.c:144:32: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:140:13: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/cups/ppd-emit.c:144:56: branch_true: ...to here
cups-2.4.16/cups/ppd-emit.c:140:13: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.16/cups/ppd-emit.c:139:19: branch_false: ...to here
cups-2.4.16/cups/ppd-emit.c:139:19: throw: if ‘ppdFindNextAttr’ throws an exception...
cups-2.4.16/cups/ppd-emit.c:139:19: danger: ‘orders’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  137|         for (attr = ppdFindAttr(ppd, "NonUIOrderDependency", NULL);
#  138|              attr;
#  139|-> 	   attr = ppdFindNextAttr(ppd, "NonUIOrderDependency", NULL))
#  140|           if (attr->value &&
#  141|   	    sscanf(attr->value, "%f%16s%41s%40s", &aorder, asection, amain,

Error: COMPILER_WARNING (CWE-704): [#def201]
cups-2.4.16/cups/ppd-emit.c: scope_hint: In function ‘ppdEmitJCL’
cups-2.4.16/cups/ppd-emit.c:448:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  448 |     if ((ptr = strrchr(title, '/')) != NULL)
#      |              ^
#  446|         title = "Unknown";
#  447|   
#  448|->     if ((ptr = strrchr(title, '/')) != NULL)
#  449|       {
#  450|        /*

Error: COMPILER_WARNING (CWE-704): [#def202]
cups-2.4.16/cups/ppd-emit.c:448:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  446|         title = "Unknown";
#  447|   
#  448|->     if ((ptr = strrchr(title, '/')) != NULL)
#  449|       {
#  450|        /*

Error: COMPILER_WARNING (CWE-704): [#def203]
cups-2.4.16/cups/ppd-emit.c:467:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  467 |       if ((ptr = strstr(title, " - ")) != NULL)
#      |                ^
#  465|           title ++;
#  466|   
#  467|->       if ((ptr = strstr(title, " - ")) != NULL)
#  468|         {
#  469|          /*

Error: COMPILER_WARNING (CWE-704): [#def204]
cups-2.4.16/cups/ppd-emit.c:467:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  465|           title ++;
#  466|   
#  467|->       if ((ptr = strstr(title, " - ")) != NULL)
#  468|         {
#  469|          /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def205]
cups-2.4.16/cups/ppd-localize.c:548:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.16/cups/ppd-localize.c:508:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-localize.c:515:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-localize.c:518:23: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:518:16: acquire_memory: allocated here
cups-2.4.16/cups/ppd-localize.c:518:6: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
cups-2.4.16/cups/ppd-localize.c:518:6: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:524:21: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-localize.c:524:21: branch_true: ...to here
cups-2.4.16/cups/ppd-localize.c:530:12: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-localize.c:533:8: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:533:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-localize.c:533:8: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:542:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-localize.c:545:10: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:545:8: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.16/cups/ppd-localize.c:548:29: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:548:5: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/cups/ppd-localize.c:548:5: danger: ‘ptr’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  546|         continue;
#  547|   
#  548|->     cupsArrayAdd(languages, strdup(start));
#  549|     }
#  550|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
cups-2.4.16/cups/ppd-localize.c:548:5: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(ptr)’
cups-2.4.16/cups/ppd-localize.c:508:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-localize.c:515:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-localize.c:518:23: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:518:6: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
cups-2.4.16/cups/ppd-localize.c:518:6: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:524:21: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-localize.c:524:21: branch_true: ...to here
cups-2.4.16/cups/ppd-localize.c:530:12: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-localize.c:533:8: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:533:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-localize.c:533:8: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:542:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-localize.c:545:10: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:545:8: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.16/cups/ppd-localize.c:548:29: branch_false: ...to here
cups-2.4.16/cups/ppd-localize.c:548:29: acquire_memory: allocated here
cups-2.4.16/cups/ppd-localize.c:548:5: danger: ‘strdup(ptr)’ leaks here; was allocated at [(17)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/16)
#  546|         continue;
#  547|   
#  548|->     cupsArrayAdd(languages, strdup(start));
#  549|     }
#  550|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
cups-2.4.16/cups/ppd-mark.c:922:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/cups/ppd-mark.c:760:1: enter_function: entry to ‘ppd_mark_option’
cups-2.4.16/cups/ppd-mark.c:803:7: call_function: calling ‘ppdFindOption’ from ‘ppd_mark_option’
cups-2.4.16/cups/ppd-mark.c:803:7: return_function: returning to ‘ppd_mark_option’ from ‘ppdFindOption’
cups-2.4.16/cups/ppd-mark.c:807:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-mark.c:810:9: branch_false: ...to here
cups-2.4.16/cups/ppd-mark.c:812:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-mark.c:899:12: branch_false: ...to here
cups-2.4.16/cups/ppd-mark.c:899:11: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-mark.c:913:14: branch_true: ...to here
cups-2.4.16/cups/ppd-mark.c:913:14: call_function: calling ‘ppdFindChoice’ from ‘ppd_mark_option’
cups-2.4.16/cups/ppd-mark.c:913:14: return_function: returning to ‘ppd_mark_option’ from ‘ppdFindChoice’
cups-2.4.16/cups/ppd-mark.c:913:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/ppd-mark.c:916:20: branch_false: ...to here
cups-2.4.16/cups/ppd-mark.c:916:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-mark.c:918:18: branch_true: ...to here
cups-2.4.16/cups/ppd-mark.c:920:31: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-mark.c:922:51: branch_true: ...to here
cups-2.4.16/cups/ppd-mark.c:967:47: acquire_memory: allocated here
cups-2.4.16/cups/ppd-mark.c:920:31: branch_true: following ‘true’ branch...
cups-2.4.16/cups/ppd-mark.c:922:51: branch_true: ...to here
cups-2.4.16/cups/ppd-mark.c:922:23: danger: ‘<unknown>’ leaks here; was allocated at [(30)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/29)
#  920|         for (i = 0, val = vals; i < num_vals; i ++, val ++)
#  921|         {
#  922|->         if ((cparam = ppdFindCustomParam(coption, val->name)) == NULL)
#  923|   	  continue;
#  924|   

Error: CPPCHECK_WARNING (CWE-457): [#def208]
cups-2.4.16/cups/pwg-media.c:415: warning[uninitvar]: Uninitialized variable: name
#  413|     */
#  414|   
#  415|->   snprintf(keyword, keysize, "%s_%s_%s", prefix, name, usize);
#  416|   
#  417|     return (1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def209]
cups-2.4.16/cups/raster-interpret.c:532:5: warning[-Wanalyzer-malloc-leak]: leak of ‘codecopy’
cups-2.4.16/cups/raster-interpret.c:524:19: acquire_memory: allocated here
cups-2.4.16/cups/raster-interpret.c:524:6: branch_false: following ‘false’ branch (when ‘codecopy’ is non-NULL)...
cups-2.4.16/cups/raster-interpret.c:530:13: branch_false: ...to here
cups-2.4.16/cups/raster-interpret.c:530:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/raster-interpret.c:532:5: branch_true: ...to here
cups-2.4.16/cups/raster-interpret.c:532:5: throw: if ‘_cupsRasterAddError’ throws an exception...
cups-2.4.16/cups/raster-interpret.c:532:5: danger: ‘codecopy’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  530|     if ((st = new_stack()) == NULL)
#  531|     {
#  532|->     _cupsRasterAddError("Unable to create stack.\n");
#  533|       free(codecopy);
#  534|       return (-1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
cups-2.4.16/cups/raster-interpret.c:1053:8: warning[-Wanalyzer-malloc-leak]: leak of ‘new_stack()’
cups-2.4.16/cups/raster-interpret.c:505:1: enter_function: entry to ‘_cupsRasterExecPS’
cups-2.4.16/cups/raster-interpret.c:524:6: branch_false: following ‘false’ branch (when ‘codecopy’ is non-NULL)...
cups-2.4.16/cups/raster-interpret.c:530:13: branch_false: ...to here
cups-2.4.16/cups/raster-interpret.c:530:13: call_function: calling ‘new_stack’ from ‘_cupsRasterExecPS’
cups-2.4.16/cups/raster-interpret.c:530:13: return_function: returning to ‘_cupsRasterExecPS’ from ‘new_stack’
cups-2.4.16/cups/raster-interpret.c:530:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-interpret.c:541:3: branch_false: ...to here
cups-2.4.16/cups/raster-interpret.c:543:17: call_function: calling ‘scan_ps’ from ‘_cupsRasterExecPS’
# 1051|   
# 1052|   
# 1053|->   if (!*ptr)
# 1054|       return (NULL);
# 1055|    /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def211]
cups-2.4.16/cups/raster-interpret.c:1329:30: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/cups/raster-interpret.c:505:1: enter_function: entry to ‘_cupsRasterExecPS’
cups-2.4.16/cups/raster-interpret.c:524:6: branch_false: following ‘false’ branch (when ‘codecopy’ is non-NULL)...
cups-2.4.16/cups/raster-interpret.c:530:13: branch_false: ...to here
cups-2.4.16/cups/raster-interpret.c:530:13: call_function: calling ‘new_stack’ from ‘_cupsRasterExecPS’
cups-2.4.16/cups/raster-interpret.c:530:13: return_function: returning to ‘_cupsRasterExecPS’ from ‘new_stack’
cups-2.4.16/cups/raster-interpret.c:530:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-interpret.c:541:3: branch_false: ...to here
cups-2.4.16/cups/raster-interpret.c:543:17: call_function: calling ‘scan_ps’ from ‘_cupsRasterExecPS’
# 1327|   	  */
# 1328|   
# 1329|-> 	  obj.value.number = _cupsStrScand(start, &cur, localeconv());
# 1330|             break;
# 1331|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def212]
cups-2.4.16/cups/raster-interpret.c:1329:30: warning[-Wanalyzer-malloc-leak]: leak of ‘codeptr’
cups-2.4.16/cups/raster-interpret.c:505:1: enter_function: entry to ‘_cupsRasterExecPS’
cups-2.4.16/cups/raster-interpret.c:524:19: acquire_memory: allocated here
cups-2.4.16/cups/raster-interpret.c:524:6: branch_false: following ‘false’ branch (when ‘codecopy’ is non-NULL)...
cups-2.4.16/cups/raster-interpret.c:530:13: branch_false: ...to here
cups-2.4.16/cups/raster-interpret.c:530:13: call_function: calling ‘new_stack’ from ‘_cupsRasterExecPS’
cups-2.4.16/cups/raster-interpret.c:530:13: return_function: returning to ‘_cupsRasterExecPS’ from ‘new_stack’
cups-2.4.16/cups/raster-interpret.c:530:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-interpret.c:541:3: branch_false: ...to here
cups-2.4.16/cups/raster-interpret.c:543:17: call_function: calling ‘scan_ps’ from ‘_cupsRasterExecPS’
# 1327|   	  */
# 1328|   
# 1329|-> 	  obj.value.number = _cupsStrScand(start, &cur, localeconv());
# 1330|             break;
# 1331|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def213]
cups-2.4.16/cups/raster-stream.c:1515:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*r_61(D)->bufptr’
cups-2.4.16/cups/raster-stream.c:1415:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1422:25: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1423:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1426:23: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1426:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/raster-stream.c:1428:22: branch_true: ...to here
cups-2.4.16/cups/raster-stream.c:1433:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1436:14: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1438:8: branch_false: following ‘false’ branch (when ‘rptr’ is non-NULL)...
cups-2.4.16/cups/raster-stream.c:1441:5: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1452:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/raster-stream.c:1455:5: branch_true: ...to here
cups-2.4.16/cups/raster-stream.c:1459:8: branch_false: following ‘false’ branch (when ‘remaining != 0’)...
cups-2.4.16/cups/raster-stream.c:1506:8: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1509:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/raster-stream.c:1515:15: branch_true: ...to here
cups-2.4.16/cups/raster-stream.c:1515:14: danger: use of uninitialized value ‘*r_61(D)->bufptr’ here
# 1513|         */
# 1514|   
# 1515|->       *buf = *(r->bufptr)++;
# 1516|         remaining --;
# 1517|       }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def214]
cups-2.4.16/cups/raster-stream.c:1531:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*bufptr’
cups-2.4.16/cups/raster-stream.c:1415:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1422:25: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1423:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1426:23: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1426:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/raster-stream.c:1428:22: branch_true: ...to here
cups-2.4.16/cups/raster-stream.c:1433:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1436:14: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1438:8: branch_false: following ‘false’ branch (when ‘rptr’ is non-NULL)...
cups-2.4.16/cups/raster-stream.c:1441:5: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1452:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/raster-stream.c:1455:5: branch_true: ...to here
cups-2.4.16/cups/raster-stream.c:1459:8: branch_false: following ‘false’ branch (when ‘remaining != 0’)...
cups-2.4.16/cups/raster-stream.c:1506:8: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1509:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1518:13: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1518:13: branch_true: following ‘true’ branch...
cups-2.4.16/cups/raster-stream.c:1528:7: branch_true: ...to here
cups-2.4.16/cups/raster-stream.c:1530:32: branch_true: following ‘true’ branch (when ‘count > 0’)...
cups-2.4.16/cups/raster-stream.c:1531:19: branch_true: ...to here
cups-2.4.16/cups/raster-stream.c:1531:18: danger: use of uninitialized value ‘*bufptr’ here
# 1529|   
# 1530|         for (bufptr = r->bufptr; count > 0; count --, total ++)
# 1531|-> 	*buf++ = *bufptr++;
# 1532|   
# 1533|         r->bufptr = bufptr;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def215]
cups-2.4.16/cups/raster-stream.c:1541:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*r.bufptr’
cups-2.4.16/cups/raster-stream.c:1415:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1422:25: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1423:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1426:23: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1426:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/raster-stream.c:1428:22: branch_true: ...to here
cups-2.4.16/cups/raster-stream.c:1433:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1436:14: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1438:8: branch_false: following ‘false’ branch (when ‘rptr’ is non-NULL)...
cups-2.4.16/cups/raster-stream.c:1441:5: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1452:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/raster-stream.c:1455:5: branch_true: ...to here
cups-2.4.16/cups/raster-stream.c:1459:8: branch_false: following ‘false’ branch (when ‘remaining != 0’)...
cups-2.4.16/cups/raster-stream.c:1506:8: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1509:8: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1518:13: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1518:13: branch_false: following ‘false’ branch...
cups-2.4.16/cups/raster-stream.c:1541:7: branch_false: ...to here
cups-2.4.16/cups/raster-stream.c:1541:7: danger: use of uninitialized value ‘*r.bufptr’ here
# 1539|         */
# 1540|   
# 1541|->       memcpy(buf, r->bufptr, (size_t)count);
# 1542|         r->bufptr += count;
# 1543|         remaining -= count;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
cups-2.4.16/cups/string.c:131:3: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
cups-2.4.16/cups/string.c:56:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
cups-2.4.16/cups/string.c:63:3: branch_false: ...to here
cups-2.4.16/cups/string.c:68:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/string.c:79:3: branch_false: ...to here
cups-2.4.16/cups/string.c:81:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/string.c:107:10: branch_false: ...to here
cups-2.4.16/cups/string.c:108:29: acquire_memory: allocated here
cups-2.4.16/cups/string.c:109:6: branch_false: following ‘false’ branch (when ‘item’ is non-NULL)...
cups-2.4.16/cups/string.c:116:3: branch_false: ...to here
cups-2.4.16/cups/string.c:131:3: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/cups/string.c:131:3: danger: ‘item’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  129|     */
#  130|   
#  131|->   cupsArrayAdd(stringpool, item);
#  132|   
#  133|     _cupsMutexUnlock(&sp_mutex);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def217]
cups-2.4.16/cups/tls-gnutls.c:811:7: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cups-2.4.16/cups/tls-gnutls.c:728:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/tls-gnutls.c:731:6: branch_false: ...to here
cups-2.4.16/cups/tls-gnutls.c:738:6: branch_false: following ‘false’ branch...
cups-2.4.16/cups/tls-gnutls.c:738:6: branch_false: ...to here
cups-2.4.16/cups/tls-gnutls.c:741:10: branch_true: following ‘true’ branch...
cups-2.4.16/cups/tls-gnutls.c:743:10: branch_true: ...to here
cups-2.4.16/cups/tls-gnutls.c:745:10: branch_false: following ‘false’ branch (when ‘in_certificate == 0’)...
cups-2.4.16/cups/tls-gnutls.c:745:10: branch_false: ...to here
cups-2.4.16/cups/tls-gnutls.c:741:10: branch_true: following ‘true’ branch...
cups-2.4.16/cups/tls-gnutls.c:743:10: branch_true: ...to here
cups-2.4.16/cups/tls-gnutls.c:758:13: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.16/cups/tls-gnutls.c:784:13: branch_false: ...to here
cups-2.4.16/cups/tls-gnutls.c:786:10: branch_true: following ‘true’ branch (when ‘alloc_data == 0’)...
cups-2.4.16/cups/tls-gnutls.c:788:22: branch_true: ...to here
cups-2.4.16/cups/tls-gnutls.c:788:22: acquire_memory: allocated here
cups-2.4.16/cups/tls-gnutls.c:791:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
cups-2.4.16/cups/tls-gnutls.c:810:17: branch_false: ...to here
cups-2.4.16/cups/tls-gnutls.c:811:7: throw: if ‘httpDecode64_2’ throws an exception...
cups-2.4.16/cups/tls-gnutls.c:811:7: danger: ‘data’ leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
#  809|   
#  810|         decoded = alloc_data - num_data;
#  811|->       httpDecode64_2((char *)data + num_data, &decoded, line);
#  812|         num_data += (size_t)decoded;
#  813|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def218]
cups-2.4.16/cups/tls-gnutls.c:1055:11: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cups-2.4.16/cups/tls-gnutls.c:981:1: enter_function: entry to ‘http_gnutls_load_crl’
cups-2.4.16/cups/tls-gnutls.c:985:6: branch_true: following ‘true’ branch...
cups-2.4.16/cups/tls-gnutls.c:997:5: branch_true: ...to here
cups-2.4.16/cups/tls-gnutls.c:997:5: call_function: calling ‘http_gnutls_make_path’ from ‘http_gnutls_load_crl’
cups-2.4.16/cups/tls-gnutls.c:997:5: return_function: returning to ‘http_gnutls_load_crl’ from ‘http_gnutls_make_path’
cups-2.4.16/cups/tls-gnutls.c:999:8: branch_true: following ‘true’ branch...
cups-2.4.16/cups/tls-gnutls.c:999:8: branch_true: ...to here
cups-2.4.16/cups/tls-gnutls.c:1001:14: branch_true: following ‘true’ branch...
cups-2.4.16/cups/tls-gnutls.c:1003:14: branch_true: ...to here
cups-2.4.16/cups/tls-gnutls.c:1014:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.16/cups/tls-gnutls.c:1034:14: branch_false: ...to here
cups-2.4.16/cups/tls-gnutls.c:1034:14: branch_true: following ‘true’ branch (when ‘alloc_data == 0’)...
cups-2.4.16/cups/tls-gnutls.c:1036:26: branch_true: ...to here
cups-2.4.16/cups/tls-gnutls.c:1036:26: acquire_memory: allocated here
cups-2.4.16/cups/tls-gnutls.c:1039:16: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
cups-2.4.16/cups/tls-gnutls.c:1054:21: branch_false: ...to here
cups-2.4.16/cups/tls-gnutls.c:1055:11: throw: if ‘httpDecode64_2’ throws an exception...
cups-2.4.16/cups/tls-gnutls.c:1055:11: danger: ‘data’ leaks here; was allocated at [(17)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/16)
# 1053|   
# 1054|   	  decoded = alloc_data - num_data;
# 1055|-> 	  httpDecode64_2((char *)data + num_data, &decoded, line);
# 1056|   	  num_data += (size_t)decoded;
# 1057|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def219]
cups-2.4.16/cups/tls-gnutls.c:1320:3: warning[-Wanalyzer-malloc-leak]: leak of ‘credentials’
cups-2.4.16/cups/tls-gnutls.c:1308:21: acquire_memory: allocated here
cups-2.4.16/cups/tls-gnutls.c:1309:6: branch_false: following ‘false’ branch (when ‘credentials’ is non-NULL)...
cups-2.4.16/cups/tls-gnutls.c:1320:3: branch_false: ...to here
cups-2.4.16/cups/tls-gnutls.c:1320:3: throw: if ‘gnutls_certificate_allocate_credentials’ throws an exception...
cups-2.4.16/cups/tls-gnutls.c:1320:3: danger: ‘credentials’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1318|     }
# 1319|   
# 1320|->   gnutls_certificate_allocate_credentials(credentials);
# 1321|     status = gnutls_init(&http->tls, http->mode == _HTTP_MODE_CLIENT ? GNUTLS_CLIENT : GNUTLS_SERVER);
# 1322|     if (!status)

Error: COMPILER_WARNING: [#def220]
cups-2.4.16/filter/common.c:17:9: warning: ‘_GNU_SOURCE’ redefined
#   17 | #define _GNU_SOURCE
#      |         ^~~~~~~~~~~
<command-line>: note: this is the location of the previous definition
#   15|   #include "config.h"
#   16|   #ifdef WITH_LSPP
#   17|-> #define _GNU_SOURCE
#   18|   #include <string.h>
#   19|   #endif /* WITH_LSPP */

Error: COMPILER_WARNING: [#def221]
cups-2.4.16/filter/common.c:17:9: warning[warning]: ‘_GNU_SOURCE’ redefined
#   15|   #include "config.h"
#   16|   #ifdef WITH_LSPP
#   17|-> #define _GNU_SOURCE
#   18|   #include <string.h>
#   19|   #endif /* WITH_LSPP */

Error: GCC_ANALYZER_WARNING: [#def222]
cups-2.4.16/filter/common.c:353:23: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
cups-2.4.16/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/common.c:351:19: branch_true: ...to here
cups-2.4.16/filter/common.c:353:23: danger: operand ‘width’ is of type ‘float’
#  351|         lines = 1 + (int)(label_len / max_width);
#  352|         line_len = (int)(label_len / lines);
#  353|->       wrapped_label = malloc(sizeof(*wrapped_label) * lines);
#  354|         label_index = i = n = 0;
#  355|         while (classification[label_index])

Error: GCC_ANALYZER_WARNING (CWE-476): [#def223]
cups-2.4.16/filter/common.c:365:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.16/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/common.c:351:19: branch_true: ...to here
cups-2.4.16/filter/common.c:353:23: acquire_memory: this call could return NULL
cups-2.4.16/filter/common.c:355:14: branch_true: following ‘true’ branch...
cups-2.4.16/filter/common.c:357:13: branch_true: ...to here
cups-2.4.16/filter/common.c:357:12: branch_false: following ‘false’ branch...
cups-2.4.16/filter/common.c:359:32: branch_false: ...to here
cups-2.4.16/filter/common.c:365:13: danger: ‘wrapped_label + (long unsigned int)n * 8’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  363|             case '-':
#  364|               i++;
#  365|->             wrapped_label[n++] = strndup(&classification[label_index], (line_len + i));
#  366|               label_index += line_len + i;
#  367|               i = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def224]
cups-2.4.16/filter/common.c:375:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.16/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/common.c:351:19: branch_true: ...to here
cups-2.4.16/filter/common.c:353:23: acquire_memory: this call could return NULL
cups-2.4.16/filter/common.c:355:14: branch_true: following ‘true’ branch...
cups-2.4.16/filter/common.c:357:13: branch_true: ...to here
cups-2.4.16/filter/common.c:357:12: branch_false: following ‘false’ branch...
cups-2.4.16/filter/common.c:359:32: branch_false: ...to here
cups-2.4.16/filter/common.c:373:12: branch_true: following ‘true’ branch...
cups-2.4.16/filter/common.c:375:32: branch_true: ...to here
cups-2.4.16/filter/common.c:375:11: danger: ‘wrapped_label + (long unsigned int)n * 8’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  373|           if ((i + line_len) == max_width)
#  374|           {
#  375|->           wrapped_label[n++] = strndup(&(classification[label_index]), (line_len + i));
#  376|             label_index = label_index + line_len + i;
#  377|             i = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def225]
cups-2.4.16/filter/common.c:380:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.16/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/common.c:351:19: branch_true: ...to here
cups-2.4.16/filter/common.c:353:23: acquire_memory: this call could return NULL
cups-2.4.16/filter/common.c:380:7: danger: ‘wrapped_label + (long unsigned int)n * 8’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  378|           }
#  379|         }
#  380|->       wrapped_label[n] = strndup(&classification[label_index], label_len - label_index);
#  381|       }
#  382|       else

Error: CPPCHECK_WARNING (CWE-476): [#def226]
cups-2.4.16/filter/common.c:386: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: wrapped_label
#  384|         lines = 1;
#  385|         wrapped_label = malloc(sizeof(*wrapped_label));
#  386|->       wrapped_label[0] = (char*)classification;
#  387|       }
#  388|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def227]
cups-2.4.16/filter/common.c:386:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.16/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/common.c:349:8: branch_false: following ‘false’ branch (when ‘max_width >= label_len’)...
cups-2.4.16/filter/common.c:385:23: branch_false: ...to here
cups-2.4.16/filter/common.c:385:23: acquire_memory: this call could return NULL
cups-2.4.16/filter/common.c:386:7: danger: ‘wrapped_label’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  384|         lines = 1;
#  385|         wrapped_label = malloc(sizeof(*wrapped_label));
#  386|->       wrapped_label[0] = (char*)classification;
#  387|       }
#  388|   

Error: CPPCHECK_WARNING (CWE-476): [#def228]
cups-2.4.16/filter/common.c:392: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: wrapped_label
#  390|       {
#  391|         printf("userdict/ESPp%c(", ('a' + n));
#  392|->       for (ptr = wrapped_label[n], i = 0; *ptr; ptr ++, i++)
#  393|           if (*ptr < 32 || *ptr > 126)
#  394|             printf("\\%03o", *ptr);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def229]
cups-2.4.16/filter/common.c:392:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’
cups-2.4.16/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/common.c:351:19: branch_true: ...to here
cups-2.4.16/filter/common.c:380:26: acquire_memory: this call could return NULL
cups-2.4.16/filter/common.c:389:17: branch_true: following ‘true’ branch (when ‘n < lines’)...
cups-2.4.16/filter/common.c:391:7: branch_true: ...to here
cups-2.4.16/filter/common.c:392:43: danger: ‘ptr’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  390|       {
#  391|         printf("userdict/ESPp%c(", ('a' + n));
#  392|->       for (ptr = wrapped_label[n], i = 0; *ptr; ptr ++, i++)
#  393|           if (*ptr < 32 || *ptr > 126)
#  394|             printf("\\%03o", *ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def230]
cups-2.4.16/filter/common.c:452:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/common.c:351:19: branch_true: ...to here
cups-2.4.16/filter/common.c:380:26: acquire_memory: allocated here
cups-2.4.16/filter/common.c:389:17: branch_false: following ‘false’ branch (when ‘n >= lines’)...
cups-2.4.16/filter/common.c:414:5: branch_false: ...to here
cups-2.4.16/filter/common.c:425:17: branch_false: following ‘false’ branch (when ‘n >= lines’)...
cups-2.4.16/filter/common.c:428:5: branch_false: ...to here
cups-2.4.16/filter/common.c:439:17: branch_false: following ‘false’ branch (when ‘n >= lines’)...
cups-2.4.16/filter/common.c:446:5: branch_false: ...to here
cups-2.4.16/filter/common.c:452:5: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  450|       * Do some clean up at the end of the LSPP special case
#  451|       */
#  452|->     free(wrapped_label);
#  453|   
#  454|     }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def231]
cups-2.4.16/filter/pstops.c:3236:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.16/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.16/filter/pstops.c:3224:23: acquire_memory: this call could return NULL
cups-2.4.16/filter/pstops.c:3226:14: branch_true: following ‘true’ branch...
cups-2.4.16/filter/pstops.c:3228:13: branch_true: ...to here
cups-2.4.16/filter/pstops.c:3228:12: branch_false: following ‘false’ branch...
cups-2.4.16/filter/pstops.c:3230:32: branch_false: ...to here
cups-2.4.16/filter/pstops.c:3236:13: danger: ‘wrapped_label + (long unsigned int)n * 8’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 3234|             case '-':
# 3235|               i++;
# 3236|->             wrapped_label[n++] = strndup(&classification[label_index], (line_len + i));
# 3237|               label_index += line_len + i;
# 3238|               i = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def232]
cups-2.4.16/filter/pstops.c:3246:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.16/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.16/filter/pstops.c:3224:23: acquire_memory: this call could return NULL
cups-2.4.16/filter/pstops.c:3226:14: branch_true: following ‘true’ branch...
cups-2.4.16/filter/pstops.c:3228:13: branch_true: ...to here
cups-2.4.16/filter/pstops.c:3228:12: branch_false: following ‘false’ branch...
cups-2.4.16/filter/pstops.c:3230:32: branch_false: ...to here
cups-2.4.16/filter/pstops.c:3244:12: branch_true: following ‘true’ branch...
cups-2.4.16/filter/pstops.c:3246:32: branch_true: ...to here
cups-2.4.16/filter/pstops.c:3246:11: danger: ‘wrapped_label + (long unsigned int)n * 8’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 3244|           if ((i + line_len) == max_width)
# 3245|           {
# 3246|->           wrapped_label[n++] = strndup(&(classification[label_index]), (line_len + i));
# 3247|             label_index = label_index + line_len + i;
# 3248|             i = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def233]
cups-2.4.16/filter/pstops.c:3251:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.16/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.16/filter/pstops.c:3224:23: acquire_memory: this call could return NULL
cups-2.4.16/filter/pstops.c:3251:7: danger: ‘wrapped_label + (long unsigned int)n * 8’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 3249|           }
# 3250|         }
# 3251|->       wrapped_label[n] = strndup(&classification[label_index], label_len - label_index);
# 3252|       }
# 3253|       else

Error: CPPCHECK_WARNING (CWE-476): [#def234]
cups-2.4.16/filter/pstops.c:3257: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: wrapped_label
# 3255|         lines = 1;
# 3256|         wrapped_label = malloc(sizeof(*wrapped_label));
# 3257|->       wrapped_label[0] = (char*)classification;
# 3258|       }
# 3259|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def235]
cups-2.4.16/filter/pstops.c:3257:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.16/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/pstops.c:3220:8: branch_false: following ‘false’ branch (when ‘max_width >= label_len’)...
cups-2.4.16/filter/pstops.c:3256:23: branch_false: ...to here
cups-2.4.16/filter/pstops.c:3256:23: acquire_memory: this call could return NULL
cups-2.4.16/filter/pstops.c:3257:7: danger: ‘wrapped_label’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
# 3255|         lines = 1;
# 3256|         wrapped_label = malloc(sizeof(*wrapped_label));
# 3257|->       wrapped_label[0] = (char*)classification;
# 3258|       }
# 3259|   

Error: CPPCHECK_WARNING (CWE-476): [#def236]
cups-2.4.16/filter/pstops.c:3263: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: wrapped_label
# 3261|       {
# 3262|         printf("userdict/ESPp%c(", ('a' + n));
# 3263|->       for (ptr = wrapped_label[n], i = 0; *ptr; ptr ++, i++)
# 3264|           if (*ptr < 32 || *ptr > 126)
# 3265|             printf("\\%03o", *ptr);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def237]
cups-2.4.16/filter/pstops.c:3263:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’
cups-2.4.16/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.16/filter/pstops.c:3251:26: acquire_memory: this call could return NULL
cups-2.4.16/filter/pstops.c:3260:17: branch_true: following ‘true’ branch (when ‘n < lines’)...
cups-2.4.16/filter/pstops.c:3262:7: branch_true: ...to here
cups-2.4.16/filter/pstops.c:3263:43: danger: ‘ptr’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 3261|       {
# 3262|         printf("userdict/ESPp%c(", ('a' + n));
# 3263|->       for (ptr = wrapped_label[n], i = 0; *ptr; ptr ++, i++)
# 3264|           if (*ptr < 32 || *ptr > 126)
# 3265|             printf("\\%03o", *ptr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def238]
cups-2.4.16/filter/pstops.c:3319:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.16/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.16/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.16/filter/pstops.c:3251:26: acquire_memory: allocated here
cups-2.4.16/filter/pstops.c:3260:17: branch_false: following ‘false’ branch (when ‘n >= lines’)...
cups-2.4.16/filter/pstops.c:3285:5: branch_false: ...to here
cups-2.4.16/filter/pstops.c:3319:5: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
# 3317|       * Do some clean up at the end of the LSPP special case
# 3318|       */
# 3319|->     free(wrapped_label);
# 3320|   
# 3321|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def239]
cups-2.4.16/filter/rastertoepson.c:1020:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/filter/rastertoepson.c:991:6: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertoepson.c:1008:6: branch_false: ...to here
cups-2.4.16/filter/rastertoepson.c:1008:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.16/filter/rastertoepson.c:1010:15: branch_true: ...to here
cups-2.4.16/filter/rastertoepson.c:1010:15: acquire_resource: opened here
cups-2.4.16/filter/rastertoepson.c:1010:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertoepson.c:1020:9: branch_false: ...to here
cups-2.4.16/filter/rastertoepson.c:1020:9: throw: if ‘cupsRasterOpen’ throws an exception...
cups-2.4.16/filter/rastertoepson.c:1020:9: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 1018|       fd = 0;
# 1019|   
# 1020|->   ras = cupsRasterOpen(fd, CUPS_RASTER_READ);
# 1021|   
# 1022|    /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def240]
cups-2.4.16/filter/rastertohp.c:690:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/filter/rastertohp.c:661:6: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertohp.c:678:6: branch_false: ...to here
cups-2.4.16/filter/rastertohp.c:678:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.16/filter/rastertohp.c:680:15: branch_true: ...to here
cups-2.4.16/filter/rastertohp.c:680:15: acquire_resource: opened here
cups-2.4.16/filter/rastertohp.c:680:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertohp.c:690:9: branch_false: ...to here
cups-2.4.16/filter/rastertohp.c:690:9: throw: if ‘cupsRasterOpen’ throws an exception...
cups-2.4.16/filter/rastertohp.c:690:9: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  688|       fd = 0;
#  689|   
#  690|->   ras = cupsRasterOpen(fd, CUPS_RASTER_READ);
#  691|   
#  692|    /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def241]
cups-2.4.16/filter/rastertolabel.c:1143:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/filter/rastertolabel.c:1114:6: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertolabel.c:1131:6: branch_false: ...to here
cups-2.4.16/filter/rastertolabel.c:1131:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.16/filter/rastertolabel.c:1133:15: branch_true: ...to here
cups-2.4.16/filter/rastertolabel.c:1133:15: acquire_resource: opened here
cups-2.4.16/filter/rastertolabel.c:1133:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertolabel.c:1143:9: branch_false: ...to here
cups-2.4.16/filter/rastertolabel.c:1143:9: throw: if ‘cupsRasterOpen’ throws an exception...
cups-2.4.16/filter/rastertolabel.c:1143:9: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 1141|       fd = 0;
# 1142|   
# 1143|->   ras = cupsRasterOpen(fd, CUPS_RASTER_READ);
# 1144|   
# 1145|    /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def242]
cups-2.4.16/filter/rastertopwg.c:75:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:61:11: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.16/filter/rastertopwg.c:63:15: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:63:15: acquire_resource: opened here
cups-2.4.16/filter/rastertopwg.c:63:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:72:29: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:75:12: throw: if ‘cupsRasterOpen’ throws an exception...
cups-2.4.16/filter/rastertopwg.c:75:12: danger: ‘fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   73|       final_content_type = "image/pwg-raster";
#   74|   
#   75|->   inras  = cupsRasterOpen(fd, CUPS_RASTER_READ);
#   76|     outras = cupsRasterOpen(1, !strcmp(final_content_type, "image/pwg-raster") ? CUPS_RASTER_WRITE_PWG : CUPS_RASTER_WRITE_APPLE);
#   77|   

Error: CPPCHECK_WARNING (CWE-476): [#def243]
cups-2.4.16/filter/rastertopwg.c:450: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: line
#  448|       line = malloc(linesize);
#  449|   
#  450|->     memset(line, white, linesize);
#  451|       for (y = page_top; y > 0; y --)
#  452|         if (!cupsRasterWritePixels(outras, line, outheader.cupsBytesPerLine))

Error: GCC_ANALYZER_WARNING (CWE-688): [#def244]
cups-2.4.16/filter/rastertopwg.c:450:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘line’ where non-null expected
cups-2.4.16/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:86:11: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:86:11: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:88:10: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:94:45: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:127:24: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:126:9: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:129:30: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:132:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:136:24: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:137:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:141:33: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:145:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:152:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:160:9: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:160:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:161:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:160:9: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:160:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:160:9: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:169:13: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:214:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:217:12: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:217:10: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/filter/rastertopwg.c:218:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:431:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:442:20: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:448:12: acquire_memory: this call could return NULL
cups-2.4.16/filter/rastertopwg.c:450:5: danger: argument 1 (‘line’) from [(33)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/32) could be NULL where non-null expected
#  448|       line = malloc(linesize);
#  449|   
#  450|->     memset(line, white, linesize);
#  451|       for (y = page_top; y > 0; y --)
#  452|         if (!cupsRasterWritePixels(outras, line, outheader.cupsBytesPerLine))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def245]
cups-2.4.16/filter/rastertopwg.c:462:11: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
cups-2.4.16/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:86:11: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:86:11: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:88:10: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:94:45: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:127:24: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:126:9: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:129:30: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:132:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:136:24: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:137:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:141:33: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:145:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:152:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:160:9: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:160:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:161:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:160:9: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:160:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:160:9: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:169:13: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:214:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:217:12: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:217:10: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/filter/rastertopwg.c:218:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:431:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:442:20: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:448:12: acquire_memory: allocated here
cups-2.4.16/filter/rastertopwg.c:451:24: branch_false: following ‘false’ branch (when ‘y == 0’)...
cups-2.4.16/filter/rastertopwg.c:460:10: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:460:35: branch_true: following ‘true’ branch (when ‘y != 0’)...
cups-2.4.16/filter/rastertopwg.c:462:11: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:462:11: throw: if ‘cupsRasterReadPixels’ throws an exception...
cups-2.4.16/filter/rastertopwg.c:462:11: danger: ‘line’ leaks here; was allocated at [(33)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/32)
#  460|       for (y = inheader.cupsHeight; y > 0; y --)
#  461|       {
#  462|->       if (cupsRasterReadPixels(inras, line + lineoffset, inheader.cupsBytesPerLine) != inheader.cupsBytesPerLine)
#  463|         {
#  464|   	_cupsLangPrintFilter(stderr, "ERROR", _("Error reading raster data."));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def246]
cups-2.4.16/filter/rastertopwg.c:464:9: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
cups-2.4.16/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:88:10: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:94:45: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:127:24: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:126:9: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:129:30: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:132:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:136:24: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:137:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:141:33: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:145:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:152:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:160:9: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:160:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:161:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:160:9: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:160:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:160:9: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:169:13: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:214:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:217:12: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:217:10: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/filter/rastertopwg.c:218:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:431:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:442:20: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:448:12: acquire_memory: allocated here
cups-2.4.16/filter/rastertopwg.c:451:24: branch_false: following ‘false’ branch (when ‘y == 0’)...
cups-2.4.16/filter/rastertopwg.c:460:10: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:460:35: branch_true: following ‘true’ branch (when ‘y != 0’)...
cups-2.4.16/filter/rastertopwg.c:462:11: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:462:10: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:464:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:464:9: throw: if ‘_cupsLangPrintFilter’ throws an exception...
cups-2.4.16/filter/rastertopwg.c:464:9: danger: ‘line’ leaks here; was allocated at [(31)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/30)
#  462|         if (cupsRasterReadPixels(inras, line + lineoffset, inheader.cupsBytesPerLine) != inheader.cupsBytesPerLine)
#  463|         {
#  464|-> 	_cupsLangPrintFilter(stderr, "ERROR", _("Error reading raster data."));
#  465|   	fprintf(stderr, "DEBUG: Unable to read line %d for page %d.\n",
#  466|   	        inheader.cupsHeight - y + page_top + 1, page);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
cups-2.4.16/filter/rastertopwg.c:470:12: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
cups-2.4.16/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:86:11: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:86:11: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:88:10: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:94:45: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:127:24: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:126:9: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:129:30: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:132:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:136:24: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:137:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:141:33: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:145:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:152:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:160:9: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:160:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:161:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:160:9: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:160:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:160:9: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:169:13: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:214:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:217:12: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:217:10: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/filter/rastertopwg.c:218:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:431:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:442:20: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:448:12: acquire_memory: allocated here
cups-2.4.16/filter/rastertopwg.c:451:24: branch_false: following ‘false’ branch (when ‘y == 0’)...
cups-2.4.16/filter/rastertopwg.c:460:10: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:460:35: branch_true: following ‘true’ branch (when ‘y != 0’)...
cups-2.4.16/filter/rastertopwg.c:462:11: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:462:10: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:470:12: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:470:12: throw: if ‘cupsRasterWritePixels’ throws an exception...
cups-2.4.16/filter/rastertopwg.c:470:12: danger: ‘line’ leaks here; was allocated at [(33)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/32)
#  468|         }
#  469|   
#  470|->       if (!cupsRasterWritePixels(outras, line, outheader.cupsBytesPerLine))
#  471|         {
#  472|   	_cupsLangPrintFilter(stderr, "ERROR", _("Error sending raster data."));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def248]
cups-2.4.16/filter/rastertopwg.c:481:12: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
cups-2.4.16/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:86:11: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:86:11: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:88:10: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:94:45: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:127:24: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:126:9: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:129:30: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:132:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:136:24: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:137:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:141:33: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:145:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:152:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:160:9: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:160:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:161:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:160:9: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:160:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:160:9: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:169:13: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:214:8: branch_true: following ‘true’ branch...
cups-2.4.16/filter/rastertopwg.c:217:12: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:217:10: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/filter/rastertopwg.c:218:9: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:431:8: branch_false: following ‘false’ branch...
cups-2.4.16/filter/rastertopwg.c:442:20: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:448:12: acquire_memory: allocated here
cups-2.4.16/filter/rastertopwg.c:451:24: branch_false: following ‘false’ branch (when ‘y == 0’)...
cups-2.4.16/filter/rastertopwg.c:460:10: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:460:35: branch_false: following ‘false’ branch (when ‘y == 0’)...
cups-2.4.16/filter/rastertopwg.c:479:5: branch_false: ...to here
cups-2.4.16/filter/rastertopwg.c:480:27: branch_true: following ‘true’ branch (when ‘y != 0’)...
cups-2.4.16/filter/rastertopwg.c:481:12: branch_true: ...to here
cups-2.4.16/filter/rastertopwg.c:481:12: throw: if ‘cupsRasterWritePixels’ throws an exception...
cups-2.4.16/filter/rastertopwg.c:481:12: danger: ‘line’ leaks here; was allocated at [(33)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/32)
#  479|       memset(line, white, linesize);
#  480|       for (y = page_bottom; y > 0; y --)
#  481|->       if (!cupsRasterWritePixels(outras, line, outheader.cupsBytesPerLine))
#  482|         {
#  483|   	_cupsLangPrintFilter(stderr, "ERROR", _("Error sending raster data."));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def249]
cups-2.4.16/locale/checkpo.c:383:5: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
cups-2.4.16/locale/checkpo.c:359:10: branch_true: following ‘true’ branch (when ‘id’ is non-NULL)...
cups-2.4.16/locale/checkpo.c:361:9: branch_true: ...to here
cups-2.4.16/locale/checkpo.c:383:24: acquire_memory: allocated here
cups-2.4.16/locale/checkpo.c:383:5: danger: ‘strdup(&buf)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  381|   
#  382|       *bufptr = '\0';
#  383|->     cupsArrayAdd(fmts, strdup(buf));
#  384|     }
#  385|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def250]
cups-2.4.16/locale/po2strings.c:126:10: warning[-Wanalyzer-malloc-leak]: leak of ‘msgid’
cups-2.4.16/locale/po2strings.c:81:15: branch_true: following ‘true’ branch (when ‘i < argc’)...
cups-2.4.16/locale/po2strings.c:83:21: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:85:13: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:90:13: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:90:13: branch_true: following ‘true’ branch (when ‘pofile’ is NULL)...
cups-2.4.16/locale/po2strings.c:81:25: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:81:15: branch_true: following ‘true’ branch (when ‘i < argc’)...
cups-2.4.16/locale/po2strings.c:83:21: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:85:13: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:90:13: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:92:13: branch_true: following ‘true’ branch (when ‘stringsfile’ is NULL)...
cups-2.4.16/locale/po2strings.c:81:25: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:101:6: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:111:13: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:111:6: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:117:18: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:117:6: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:117:6: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:126:10: branch_true: following ‘true’ branch...
cups-2.4.16/locale/po2strings.c:128:9: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:174:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/locale/po2strings.c:177:7: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:189:12: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:195:12: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:195:12: branch_false: following ‘false’ branch (when ‘msgid’ is NULL)...
cups-2.4.16/locale/po2strings.c:198:12: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:198:12: branch_false: following ‘false’ branch (when ‘msgstr’ is NULL)...
cups-2.4.16/locale/po2strings.c:201:18: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:201:18: acquire_memory: allocated here
cups-2.4.16/locale/po2strings.c:126:10: throw: if ‘cupsFileGets’ throws an exception...
cups-2.4.16/locale/po2strings.c:126:10: danger: ‘msgid’ leaks here; was allocated at [(30)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/29)
#  124|     msgid = msgstr = NULL;
#  125|   
#  126|->   while (cupsFileGets(po, s, sizeof(s)) != NULL)
#  127|     {
#  128|       if (s[0] == '#' && s[1] == '.')

Error: GCC_ANALYZER_WARNING (CWE-401): [#def251]
cups-2.4.16/locale/po2strings.c:149:7: warning[-Wanalyzer-malloc-leak]: leak of ‘msgid’
cups-2.4.16/locale/po2strings.c:81:15: branch_true: following ‘true’ branch (when ‘i < argc’)...
cups-2.4.16/locale/po2strings.c:83:21: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:85:13: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:90:13: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:90:13: branch_true: following ‘true’ branch (when ‘pofile’ is NULL)...
cups-2.4.16/locale/po2strings.c:81:25: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:81:15: branch_true: following ‘true’ branch (when ‘i < argc’)...
cups-2.4.16/locale/po2strings.c:83:21: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:85:13: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:90:13: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:92:13: branch_true: following ‘true’ branch (when ‘stringsfile’ is NULL)...
cups-2.4.16/locale/po2strings.c:81:25: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:101:6: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:111:13: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:111:6: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:117:18: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:117:6: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:117:6: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:126:10: branch_true: following ‘true’ branch...
cups-2.4.16/locale/po2strings.c:128:9: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:174:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.16/locale/po2strings.c:177:7: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:189:12: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:195:12: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:195:12: branch_false: following ‘false’ branch (when ‘msgid’ is NULL)...
cups-2.4.16/locale/po2strings.c:198:12: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:198:12: branch_false: following ‘false’ branch (when ‘msgstr’ is NULL)...
cups-2.4.16/locale/po2strings.c:201:18: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:201:18: acquire_memory: allocated here
cups-2.4.16/locale/po2strings.c:126:10: branch_true: following ‘true’ branch...
cups-2.4.16/locale/po2strings.c:128:9: branch_true: ...to here
cups-2.4.16/locale/po2strings.c:134:10: branch_false: following ‘false’ branch...
cups-2.4.16/locale/po2strings.c:149:7: branch_false: ...to here
cups-2.4.16/locale/po2strings.c:149:7: throw: if ‘cupsFilePrintf’ throws an exception...
cups-2.4.16/locale/po2strings.c:149:7: danger: ‘msgid’ leaks here; was allocated at [(30)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/29)
#  147|         }
#  148|   
#  149|->       cupsFilePrintf(strings, "//%s\n", s + 2);
#  150|       }
#  151|       else if (s[0] == '#' || !s[0])

Error: GCC_ANALYZER_WARNING (CWE-775): [#def252]
cups-2.4.16/monitor/bcp.c:75:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:62:14: acquire_resource: opened here
cups-2.4.16/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:75:9: throw: if ‘ppdOpenFile’ throws an exception...
cups-2.4.16/monitor/bcp.c:75:9: danger: ‘fp’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   73|     */
#   74|   
#   75|->   ppd = ppdOpenFile(getenv("PPD"));
#   76|   
#   77|    /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def253]
cups-2.4.16/monitor/bcp.c:75:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:62:14: acquire_memory: allocated here
cups-2.4.16/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:75:9: throw: if ‘ppdOpenFile’ throws an exception...
cups-2.4.16/monitor/bcp.c:75:9: danger: ‘fp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   73|     */
#   74|   
#   75|->   ppd = ppdOpenFile(getenv("PPD"));
#   76|   
#   77|    /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def254]
cups-2.4.16/monitor/bcp.c:143:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/monitor/bcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.16/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:62:14: acquire_resource: opened here
cups-2.4.16/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:81:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.16/monitor/bcp.c:83:5: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:85:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:87:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:88:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:90:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:96:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:138:11: call_function: calling ‘psgets’ from ‘main’
cups-2.4.16/monitor/bcp.c:138:11: return_function: returning to ‘main’ from ‘psgets’
cups-2.4.16/monitor/bcp.c:138:10: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:143:5: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:143:5: throw: if ‘fflush’ throws an exception...
cups-2.4.16/monitor/bcp.c:143:5: danger: ‘fp’ leaks here; was opened at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  141|       while (pswrite(line, linelen) > 0);
#  142|   
#  143|->     fflush(stdout);
#  144|     }
#  145|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def255]
cups-2.4.16/monitor/bcp.c:143:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/monitor/bcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.16/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:62:14: acquire_memory: allocated here
cups-2.4.16/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:81:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.16/monitor/bcp.c:83:5: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:85:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:87:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:88:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:90:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:96:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:138:11: call_function: calling ‘psgets’ from ‘main’
cups-2.4.16/monitor/bcp.c:138:11: return_function: returning to ‘main’ from ‘psgets’
cups-2.4.16/monitor/bcp.c:138:10: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:143:5: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:143:5: throw: if ‘fflush’ throws an exception...
cups-2.4.16/monitor/bcp.c:143:5: danger: ‘fp’ leaks here; was allocated at [(6)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/5)
#  141|       while (pswrite(line, linelen) > 0);
#  142|   
#  143|->     fflush(stdout);
#  144|     }
#  145|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def256]
cups-2.4.16/monitor/bcp.c:189:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/monitor/bcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.16/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:62:14: acquire_resource: opened here
cups-2.4.16/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:81:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.16/monitor/bcp.c:83:5: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:85:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:87:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:88:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:90:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:96:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:138:11: call_function: calling ‘psgets’ from ‘main’
#  187|         if (ch != EOF && ch != '\n')
#  188|         {
#  189|->         ungetc(ch, fp);	/* Nope, save it for later... */
#  190|           ch = '\r';
#  191|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def257]
cups-2.4.16/monitor/bcp.c:189:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/monitor/bcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.16/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:62:14: acquire_memory: allocated here
cups-2.4.16/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:81:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.16/monitor/bcp.c:83:5: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:85:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:87:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:88:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:90:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:96:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:138:11: call_function: calling ‘psgets’ from ‘main’
#  187|         if (ch != EOF && ch != '\n')
#  188|         {
#  189|->         ungetc(ch, fp);	/* Nope, save it for later... */
#  190|           ch = '\r';
#  191|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def258]
cups-2.4.16/monitor/bcp.c:211:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/monitor/bcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.16/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:62:14: acquire_resource: opened here
cups-2.4.16/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:81:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.16/monitor/bcp.c:83:5: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:85:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:87:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:88:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:90:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:96:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:138:11: call_function: calling ‘psgets’ from ‘main’
#  209|         *bufptr++ = (char)ch;
#  210|       else
#  211|->       ungetc(ch, fp);
#  212|     }
#  213|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def259]
cups-2.4.16/monitor/bcp.c:211:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/monitor/bcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.16/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.16/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:62:14: acquire_memory: allocated here
cups-2.4.16/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.16/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.16/monitor/bcp.c:81:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.16/monitor/bcp.c:83:5: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:85:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:87:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:88:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:90:9: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:96:7: branch_true: ...to here
cups-2.4.16/monitor/bcp.c:126:8: branch_true: following ‘true’ branch...
cups-2.4.16/monitor/bcp.c:138:11: call_function: calling ‘psgets’ from ‘main’
#  209|         *bufptr++ = (char)ch;
#  210|       else
#  211|->       ungetc(ch, fp);
#  212|     }
#  213|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def260]
cups-2.4.16/notifier/mailto.c:553:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:553:5: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:553:5: danger: ‘pipefds[0]’ leaks here
#  551|       */
#  552|   
#  553|->     close(0);
#  554|       dup(pipefds[0]);
#  555|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def261]
cups-2.4.16/notifier/mailto.c:553:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:553:5: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:553:5: danger: ‘pipefds[1]’ leaks here
#  551|       */
#  552|   
#  553|->     close(0);
#  554|       dup(pipefds[0]);
#  555|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def262]
cups-2.4.16/notifier/mailto.c:556:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:556:5: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:556:5: danger: ‘pipefds[0]’ leaks here
#  554|       dup(pipefds[0]);
#  555|   
#  556|->     close(1);
#  557|       dup(2);
#  558|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def263]
cups-2.4.16/notifier/mailto.c:556:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:556:5: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:556:5: danger: ‘pipefds[1]’ leaks here
#  554|       dup(pipefds[0]);
#  555|   
#  556|->     close(1);
#  557|       dup(2);
#  558|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def264]
cups-2.4.16/notifier/mailto.c:559:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:559:5: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:559:5: danger: ‘pipefds[0]’ leaks here
#  557|       dup(2);
#  558|   
#  559|->     close(pipefds[0]);
#  560|       close(pipefds[1]);
#  561|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def265]
cups-2.4.16/notifier/mailto.c:559:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:559:5: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:559:5: danger: ‘pipefds[1]’ leaks here
#  557|       dup(2);
#  558|   
#  559|->     close(pipefds[0]);
#  560|       close(pipefds[1]);
#  561|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def266]
cups-2.4.16/notifier/mailto.c:560:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:560:5: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:560:5: danger: ‘pipefds[1]’ leaks here
#  558|   
#  559|       close(pipefds[0]);
#  560|->     close(pipefds[1]);
#  561|   
#  562|       execvp(argv[0], argv);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def267]
cups-2.4.16/notifier/mailto.c:571:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:565:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.16/notifier/mailto.c:571:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:571:5: throw: if ‘perror’ throws an exception...
cups-2.4.16/notifier/mailto.c:571:5: danger: ‘pipefds[0]’ leaks here
#  569|       */
#  570|   
#  571|->     perror("ERROR: Unable to fork command");
#  572|   
#  573|       close(pipefds[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def268]
cups-2.4.16/notifier/mailto.c:571:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:565:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.16/notifier/mailto.c:571:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:571:5: throw: if ‘perror’ throws an exception...
cups-2.4.16/notifier/mailto.c:571:5: danger: ‘pipefds[1]’ leaks here
#  569|       */
#  570|   
#  571|->     perror("ERROR: Unable to fork command");
#  572|   
#  573|       close(pipefds[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def269]
cups-2.4.16/notifier/mailto.c:573:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:565:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.16/notifier/mailto.c:571:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:573:5: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:573:5: danger: ‘pipefds[0]’ leaks here
#  571|       perror("ERROR: Unable to fork command");
#  572|   
#  573|->     close(pipefds[0]);
#  574|       close(pipefds[1]);
#  575|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def270]
cups-2.4.16/notifier/mailto.c:573:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:565:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.16/notifier/mailto.c:571:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:573:5: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:573:5: danger: ‘pipefds[1]’ leaks here
#  571|       perror("ERROR: Unable to fork command");
#  572|   
#  573|->     close(pipefds[0]);
#  574|       close(pipefds[1]);
#  575|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def271]
cups-2.4.16/notifier/mailto.c:574:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:565:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.16/notifier/mailto.c:571:5: branch_true: ...to here
cups-2.4.16/notifier/mailto.c:574:5: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:574:5: danger: ‘pipefds[1]’ leaks here
#  572|   
#  573|       close(pipefds[0]);
#  574|->     close(pipefds[1]);
#  575|   
#  576|       return (NULL);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def272]
cups-2.4.16/notifier/mailto.c:584:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:565:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/notifier/mailto.c:584:3: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:584:3: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:584:3: danger: ‘pipefds[0]’ leaks here
#  582|     */
#  583|   
#  584|->   close(pipefds[0]);
#  585|   
#  586|     if ((fp = cupsFileOpenFd(pipefds[1], "w")) == NULL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def273]
cups-2.4.16/notifier/mailto.c:584:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:565:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/notifier/mailto.c:584:3: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:584:3: throw: if ‘close’ throws an exception...
cups-2.4.16/notifier/mailto.c:584:3: danger: ‘pipefds[1]’ leaks here
#  582|     */
#  583|   
#  584|->   close(pipefds[0]);
#  585|   
#  586|     if ((fp = cupsFileOpenFd(pipefds[1], "w")) == NULL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def274]
cups-2.4.16/notifier/mailto.c:586:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.16/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.16/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:565:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/notifier/mailto.c:584:3: branch_false: ...to here
cups-2.4.16/notifier/mailto.c:586:13: throw: if ‘cupsFileOpenFd’ throws an exception...
cups-2.4.16/notifier/mailto.c:586:13: danger: ‘pipefds[1]’ leaks here
#  584|     close(pipefds[0]);
#  585|   
#  586|->   if ((fp = cupsFileOpenFd(pipefds[1], "w")) == NULL)
#  587|     {
#  588|       int	status;				/* Status of command */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def275]
cups-2.4.16/notifier/rss.c:535:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
cups-2.4.16/notifier/rss.c:450:13: acquire_resource: opened here
cups-2.4.16/notifier/rss.c:450:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:450:6: branch_false: ...to here
cups-2.4.16/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:468:8: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:8: branch_true: ...to here
cups-2.4.16/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:468:8: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:470:14: branch_false: ...to here
cups-2.4.16/notifier/rss.c:470:13: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:500:13: branch_false: ...to here
cups-2.4.16/notifier/rss.c:500:13: branch_false: following ‘false’ branch (when ‘in_item != 0’)...
cups-2.4.16/notifier/rss.c:502:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:502:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:511:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:511:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:520:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:520:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:529:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:529:13: branch_true: following ‘true’ branch (when ‘start’ is non-NULL)...
cups-2.4.16/notifier/rss.c:531:7: branch_true: ...to here
cups-2.4.16/notifier/rss.c:532:10: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
cups-2.4.16/notifier/rss.c:534:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:535:22: throw: if ‘httpGetDateTime’ throws an exception...
cups-2.4.16/notifier/rss.c:535:22: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  533|         {
#  534|           *end       = '\0';
#  535|-> 	event_time = httpGetDateTime(start);
#  536|         }
#  537|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
cups-2.4.16/notifier/rss.c:535:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
cups-2.4.16/notifier/rss.c:450:13: acquire_memory: allocated here
cups-2.4.16/notifier/rss.c:450:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:450:6: branch_false: ...to here
cups-2.4.16/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:468:8: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:8: branch_true: ...to here
cups-2.4.16/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:468:8: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:470:14: branch_false: ...to here
cups-2.4.16/notifier/rss.c:470:13: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:500:13: branch_false: ...to here
cups-2.4.16/notifier/rss.c:500:13: branch_false: following ‘false’ branch (when ‘in_item != 0’)...
cups-2.4.16/notifier/rss.c:502:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:502:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:511:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:511:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:520:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:520:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:529:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:529:13: branch_true: following ‘true’ branch (when ‘start’ is non-NULL)...
cups-2.4.16/notifier/rss.c:531:7: branch_true: ...to here
cups-2.4.16/notifier/rss.c:532:10: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
cups-2.4.16/notifier/rss.c:534:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:535:22: throw: if ‘httpGetDateTime’ throws an exception...
cups-2.4.16/notifier/rss.c:535:22: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  533|         {
#  534|           *end       = '\0';
#  535|-> 	event_time = httpGetDateTime(start);
#  536|         }
#  537|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def277]
cups-2.4.16/notifier/rss.c:539:30: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
cups-2.4.16/notifier/rss.c:450:13: acquire_resource: opened here
cups-2.4.16/notifier/rss.c:450:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:450:6: branch_false: ...to here
cups-2.4.16/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:468:8: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:8: branch_true: ...to here
cups-2.4.16/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:468:8: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:470:14: branch_false: ...to here
cups-2.4.16/notifier/rss.c:470:13: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:500:13: branch_false: ...to here
cups-2.4.16/notifier/rss.c:500:13: branch_false: following ‘false’ branch (when ‘in_item != 0’)...
cups-2.4.16/notifier/rss.c:502:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:502:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:511:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:511:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:520:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:520:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:529:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:529:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:538:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:538:13: branch_true: following ‘true’ branch (when ‘start’ is non-NULL)...
cups-2.4.16/notifier/rss.c:539:30: branch_true: ...to here
cups-2.4.16/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:468:8: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:470:14: branch_false: ...to here
cups-2.4.16/notifier/rss.c:470:13: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:500:13: branch_false: ...to here
cups-2.4.16/notifier/rss.c:500:13: branch_false: following ‘false’ branch (when ‘in_item != 0’)...
cups-2.4.16/notifier/rss.c:502:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:502:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:511:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:511:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:520:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:520:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:529:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:529:13: branch_true: following ‘true’ branch (when ‘start’ is non-NULL)...
cups-2.4.16/notifier/rss.c:531:7: branch_true: ...to here
cups-2.4.16/notifier/rss.c:532:10: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
cups-2.4.16/notifier/rss.c:534:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:535:22: throw: if ‘httpGetDateTime’ throws an exception...
cups-2.4.16/notifier/rss.c:539:30: danger: ‘fopen(filename, "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  537|       }
#  538|       else if ((start = strstr(line, "<guid>")) != NULL)
#  539|->       sequence_number = atoi(start + 6);
#  540|     }
#  541|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
cups-2.4.16/notifier/rss.c:539:30: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
cups-2.4.16/notifier/rss.c:450:13: acquire_memory: allocated here
cups-2.4.16/notifier/rss.c:450:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:450:6: branch_false: ...to here
cups-2.4.16/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:468:8: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:8: branch_true: ...to here
cups-2.4.16/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:468:8: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:470:14: branch_false: ...to here
cups-2.4.16/notifier/rss.c:470:13: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:500:13: branch_false: ...to here
cups-2.4.16/notifier/rss.c:500:13: branch_false: following ‘false’ branch (when ‘in_item != 0’)...
cups-2.4.16/notifier/rss.c:502:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:502:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:511:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:511:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:520:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:520:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:529:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:529:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:538:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:538:13: branch_true: following ‘true’ branch (when ‘start’ is non-NULL)...
cups-2.4.16/notifier/rss.c:539:30: branch_true: ...to here
cups-2.4.16/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.16/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:468:8: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:470:14: branch_false: ...to here
cups-2.4.16/notifier/rss.c:470:13: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:500:13: branch_false: ...to here
cups-2.4.16/notifier/rss.c:500:13: branch_false: following ‘false’ branch (when ‘in_item != 0’)...
cups-2.4.16/notifier/rss.c:502:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:502:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:511:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:511:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:520:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:520:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.16/notifier/rss.c:529:23: branch_false: ...to here
cups-2.4.16/notifier/rss.c:529:13: branch_true: following ‘true’ branch (when ‘start’ is non-NULL)...
cups-2.4.16/notifier/rss.c:531:7: branch_true: ...to here
cups-2.4.16/notifier/rss.c:532:10: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
cups-2.4.16/notifier/rss.c:534:9: branch_true: ...to here
cups-2.4.16/notifier/rss.c:535:22: throw: if ‘httpGetDateTime’ throws an exception...
cups-2.4.16/notifier/rss.c:539:30: danger: ‘fopen(filename, "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  537|       }
#  538|       else if ((start = strstr(line, "<guid>")) != NULL)
#  539|->       sequence_number = atoi(start + 6);
#  540|     }
#  541|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def279]
cups-2.4.16/notifier/rss.c:690:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "w")’
cups-2.4.16/notifier/rss.c:620:13: acquire_resource: opened here
cups-2.4.16/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.16/notifier/rss.c:642:3: throw: if ‘httpGetDateString2’ throws an exception...
cups-2.4.16/notifier/rss.c:690:29: danger: ‘fopen(filename, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  688|     */
#  689|   
#  690|->   for (bytes = 0, sptr = s; *sptr; sptr ++)
#  691|       if (*sptr == '&')
#  692|         bytes += 4;			/* &amp; */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
cups-2.4.16/notifier/rss.c:690:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "w")’
cups-2.4.16/notifier/rss.c:620:13: acquire_memory: allocated here
cups-2.4.16/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.16/notifier/rss.c:642:3: throw: if ‘httpGetDateString2’ throws an exception...
cups-2.4.16/notifier/rss.c:690:29: danger: ‘fopen(filename, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  688|     */
#  689|   
#  690|->   for (bytes = 0, sptr = s; *sptr; sptr ++)
#  691|       if (*sptr == '&')
#  692|         bytes += 4;			/* &amp; */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
cups-2.4.16/notifier/rss.c:690:29: warning[-Wanalyzer-malloc-leak]: leak of ‘xml_escape(*msg.subject)’
cups-2.4.16/notifier/rss.c:610:1: enter_function: entry to ‘save_rss’
cups-2.4.16/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.16/notifier/rss.c:634:10: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.16/notifier/rss.c:634:10: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.16/notifier/rss.c:646:8: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
cups-2.4.16/notifier/rss.c:649:32: branch_true: ...to here
cups-2.4.16/notifier/rss.c:649:21: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.16/notifier/rss.c:649:21: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.16/notifier/rss.c:650:18: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.16/notifier/rss.c:650:18: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.16/notifier/rss.c:657:5: throw: if ‘httpGetDateString2’ throws an exception...
cups-2.4.16/notifier/rss.c:690:29: danger: ‘xml_escape(*msg.subject)’ leaks here; was allocated at [(14)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/13)
#  688|     */
#  689|   
#  690|->   for (bytes = 0, sptr = s; *sptr; sptr ++)
#  691|       if (*sptr == '&')
#  692|         bytes += 4;			/* &amp; */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
cups-2.4.16/notifier/rss.c:690:29: warning[-Wanalyzer-malloc-leak]: leak of ‘xml_escape(*msg.text)’
cups-2.4.16/notifier/rss.c:610:1: enter_function: entry to ‘save_rss’
cups-2.4.16/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.16/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.16/notifier/rss.c:634:10: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.16/notifier/rss.c:634:10: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.16/notifier/rss.c:646:8: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
cups-2.4.16/notifier/rss.c:649:32: branch_true: ...to here
cups-2.4.16/notifier/rss.c:649:21: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.16/notifier/rss.c:649:21: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.16/notifier/rss.c:650:18: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.16/notifier/rss.c:650:18: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.16/notifier/rss.c:657:5: throw: if ‘httpGetDateString2’ throws an exception...
cups-2.4.16/notifier/rss.c:690:29: danger: ‘xml_escape(*msg.text)’ leaks here; was allocated at [(22)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/21)
#  688|     */
#  689|   
#  690|->   for (bytes = 0, sptr = s; *sptr; sptr ++)
#  691|       if (*sptr == '&')
#  692|         bytes += 4;			/* &amp; */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
cups-2.4.16/scheduler/auth.c:1320:22: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1320:22: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1320:22: throw: if ‘_cupsStrAlloc’ throws an exception...
cups-2.4.16/scheduler/auth.c:1320:22: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1318|   
# 1319|     if (loc->location)
# 1320|->     temp->location = _cupsStrAlloc(loc->location);
# 1321|   
# 1322|     temp->length     = loc->length;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
cups-2.4.16/scheduler/auth.c:1332:24: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1322:22: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1330:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1332:24: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1332:24: throw: if ‘cupsArrayDup’ throws an exception...
cups-2.4.16/scheduler/auth.c:1332:24: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1330|     if (loc->names)
# 1331|     {
# 1332|->     if ((temp->names = cupsArrayDup(loc->names)) == NULL)
# 1333|       {
# 1334|         cupsdLogMessage(CUPSD_LOG_ERROR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
cups-2.4.16/scheduler/auth.c:1334:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1322:22: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1330:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1332:24: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1332:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1336:60: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1334:7: throw: if ‘cupsArrayCount’ throws an exception...
cups-2.4.16/scheduler/auth.c:1334:7: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1332|       if ((temp->names = cupsArrayDup(loc->names)) == NULL)
# 1333|       {
# 1334|->       cupsdLogMessage(CUPSD_LOG_ERROR,
# 1335|                         "Unable to allocate memory for %d names: %s",
# 1336|   		      cupsArrayCount(loc->names), strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
cups-2.4.16/scheduler/auth.c:1349:24: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1322:22: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1330:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1343:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1343:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1349:24: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1349:24: throw: if ‘cupsArrayDup’ throws an exception...
cups-2.4.16/scheduler/auth.c:1349:24: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1347|       */
# 1348|   
# 1349|->     if ((temp->allow = cupsArrayDup(loc->allow)) == NULL)
# 1350|       {
# 1351|         cupsdLogMessage(CUPSD_LOG_ERROR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
cups-2.4.16/scheduler/auth.c:1351:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1322:22: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1330:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1343:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1343:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1349:24: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1349:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1353:60: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1351:7: throw: if ‘cupsArrayCount’ throws an exception...
cups-2.4.16/scheduler/auth.c:1351:7: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1349|       if ((temp->allow = cupsArrayDup(loc->allow)) == NULL)
# 1350|       {
# 1351|->       cupsdLogMessage(CUPSD_LOG_ERROR,
# 1352|                         "Unable to allocate memory for %d allow rules: %s",
# 1353|                         cupsArrayCount(loc->allow), strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
cups-2.4.16/scheduler/auth.c:1365:23: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1322:22: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1330:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1343:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1343:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1359:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1359:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1365:23: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1365:23: throw: if ‘cupsArrayDup’ throws an exception...
cups-2.4.16/scheduler/auth.c:1365:23: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 1363|       */
# 1364|   
# 1365|->     if ((temp->deny = cupsArrayDup(loc->deny)) == NULL)
# 1366|       {
# 1367|         cupsdLogMessage(CUPSD_LOG_ERROR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
cups-2.4.16/scheduler/auth.c:1367:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1322:22: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1330:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1343:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1343:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1359:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1359:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1365:23: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1365:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1369:59: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1367:7: throw: if ‘cupsArrayCount’ throws an exception...
cups-2.4.16/scheduler/auth.c:1367:7: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 1365|       if ((temp->deny = cupsArrayDup(loc->deny)) == NULL)
# 1366|       {
# 1367|->       cupsdLogMessage(CUPSD_LOG_ERROR,
# 1368|                         "Unable to allocate memory for %d deny rules: %s",
# 1369|                         cupsArrayCount(loc->deny), strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def290]
cups-2.4.16/scheduler/auth.c:1540:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1299:1: enter_function: entry to ‘cupsdCopyLocation’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1322:22: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1330:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1332:24: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1332:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1336:60: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1338:7: call_function: calling ‘cupsdFreeLocation’ from ‘cupsdCopyLocation’
# 1538|   cupsdFreeLocation(cupsd_location_t *loc)/* I - Location to free */
# 1539|   {
# 1540|->   cupsArrayDelete(loc->names);
# 1541|     cupsArrayDelete(loc->allow);
# 1542|     cupsArrayDelete(loc->deny);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def291]
cups-2.4.16/scheduler/auth.c:1541:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1299:1: enter_function: entry to ‘cupsdCopyLocation’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1322:22: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1330:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1332:24: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1332:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1336:60: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1338:7: call_function: calling ‘cupsdFreeLocation’ from ‘cupsdCopyLocation’
# 1539|   {
# 1540|     cupsArrayDelete(loc->names);
# 1541|->   cupsArrayDelete(loc->allow);
# 1542|     cupsArrayDelete(loc->deny);
# 1543|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
cups-2.4.16/scheduler/auth.c:1542:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1299:1: enter_function: entry to ‘cupsdCopyLocation’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1322:22: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1330:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1332:24: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1332:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1336:60: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1338:7: call_function: calling ‘cupsdFreeLocation’ from ‘cupsdCopyLocation’
# 1540|     cupsArrayDelete(loc->names);
# 1541|     cupsArrayDelete(loc->allow);
# 1542|->   cupsArrayDelete(loc->deny);
# 1543|   
# 1544|     _cupsStrFree(loc->location);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def293]
cups-2.4.16/scheduler/auth.c:1544:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1299:1: enter_function: entry to ‘cupsdCopyLocation’
cups-2.4.16/scheduler/auth.c:1309:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1309:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1316:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1319:7: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1319:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/auth.c:1322:22: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1330:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1332:24: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1332:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:1336:60: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:1338:7: call_function: calling ‘cupsdFreeLocation’ from ‘cupsdCopyLocation’
# 1542|     cupsArrayDelete(loc->deny);
# 1543|   
# 1544|->   _cupsStrFree(loc->location);
# 1545|     free(loc);
# 1546|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def294]
cups-2.4.16/scheduler/auth.c:1945:25: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:1938:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:1938:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:1945:25: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:1945:25: throw: if ‘_cupsStrAlloc’ throws an exception...
cups-2.4.16/scheduler/auth.c:1945:25: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1943|     */
# 1944|   
# 1945|->   if ((temp->location = _cupsStrAlloc(location)) == NULL)
# 1946|     {
# 1947|       free(temp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def295]
cups-2.4.16/scheduler/auth.c:2259:35: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/auth.c:2249:15: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:2249:6: branch_true: following ‘true’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:2251:5: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:2253:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/auth.c:2259:49: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:2259:35: throw: if ‘_cupsStrAlloc’ throws an exception...
cups-2.4.16/scheduler/auth.c:2259:35: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 2257|         */
# 2258|   
# 2259|->       if ((temp->mask.name.name = _cupsStrAlloc(temp->mask.name.name)) == NULL)
# 2260|         {
# 2261|          /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def296]
cups-2.4.16/scheduler/auth.c:2348:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/scheduler/auth.c:2314:6: branch_false: following ‘false’ branch (when ‘replies’ is non-NULL)...
cups-2.4.16/scheduler/auth.c:2314:6: branch_false: ...to here
cups-2.4.16/scheduler/auth.c:2323:15: branch_true: following ‘true’ branch (when ‘i < num_msg’)...
cups-2.4.16/scheduler/auth.c:2325:16: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:2334:37: acquire_memory: allocated here
cups-2.4.16/scheduler/auth.c:2323:15: branch_true: following ‘true’ branch (when ‘i < num_msg’)...
cups-2.4.16/scheduler/auth.c:2325:16: branch_true: ...to here
cups-2.4.16/scheduler/auth.c:2348:11: danger: ‘<unknown>’ leaks here; was allocated at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
# 2346|   
# 2347|         default:
# 2348|->           free(replies);
# 2349|             return (PAM_CONV_ERR);
# 2350|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
cups-2.4.16/scheduler/banners.c:162:5: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/banners.c:136:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/banners.c:148:15: branch_false: ...to here
cups-2.4.16/scheduler/banners.c:148:15: acquire_memory: allocated here
cups-2.4.16/scheduler/banners.c:148:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/banners.c:160:21: branch_false: ...to here
cups-2.4.16/scheduler/banners.c:160:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/banners.c:162:5: branch_true: ...to here
cups-2.4.16/scheduler/banners.c:162:5: throw: if ‘cupsdLogMessage’ throws an exception...
cups-2.4.16/scheduler/banners.c:162:5: danger: ‘temp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  160|     if ((temp->name = strdup(name)) == NULL)
#  161|     {
#  162|->     cupsdLogMessage(CUPSD_LOG_WARN,
#  163|                       "add_banner: Unable to allocate memory for banner \"%s\" - "
#  164|   		    "skipping!", name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def298]
cups-2.4.16/scheduler/banners.c:171:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/scheduler/banners.c:136:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/banners.c:148:15: branch_false: ...to here
cups-2.4.16/scheduler/banners.c:148:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/banners.c:160:21: branch_false: ...to here
cups-2.4.16/scheduler/banners.c:160:21: acquire_memory: allocated here
cups-2.4.16/scheduler/banners.c:160:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/banners.c:169:3: branch_false: ...to here
cups-2.4.16/scheduler/banners.c:171:3: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/scheduler/banners.c:171:3: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  169|     temp->filetype = filetype;
#  170|   
#  171|->   cupsArrayAdd(Banners, temp);
#  172|   }
#  173|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
cups-2.4.16/scheduler/banners.c:171:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/banners.c:136:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/banners.c:148:15: branch_false: ...to here
cups-2.4.16/scheduler/banners.c:148:15: acquire_memory: allocated here
cups-2.4.16/scheduler/banners.c:148:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/banners.c:160:21: branch_false: ...to here
cups-2.4.16/scheduler/banners.c:160:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/banners.c:169:3: branch_false: ...to here
cups-2.4.16/scheduler/banners.c:171:3: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/scheduler/banners.c:171:3: danger: ‘temp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  169|     temp->filetype = filetype;
#  170|   
#  171|->   cupsArrayAdd(Banners, temp);
#  172|   }
#  173|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
cups-2.4.16/scheduler/client.c:136:20: warning[-Wanalyzer-malloc-leak]: leak of ‘con’
cups-2.4.16/scheduler/client.c:103:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:111:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:114:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:122:14: branch_false: ...to here
cups-2.4.16/scheduler/client.c:122:14: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:122:6: branch_false: following ‘false’ branch (when ‘con’ is non-NULL)...
cups-2.4.16/scheduler/client.c:133:17: branch_false: ...to here
cups-2.4.16/scheduler/client.c:136:20: throw: if ‘httpAcceptConnection’ throws an exception...
cups-2.4.16/scheduler/client.c:136:20: danger: ‘con’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  134|     con->file   = -1;
#  135|   
#  136|->   if ((con->http = httpAcceptConnection(lis->fd, 0)) == NULL)
#  137|     {
#  138|       if (errno == ENFILE || errno == EMFILE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
cups-2.4.16/scheduler/client.c:139:7: warning[-Wanalyzer-malloc-leak]: leak of ‘con’
cups-2.4.16/scheduler/client.c:103:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:111:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:114:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:122:14: branch_false: ...to here
cups-2.4.16/scheduler/client.c:122:14: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:122:6: branch_false: following ‘false’ branch (when ‘con’ is non-NULL)...
cups-2.4.16/scheduler/client.c:133:17: branch_false: ...to here
cups-2.4.16/scheduler/client.c:136:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:138:9: branch_true: ...to here
cups-2.4.16/scheduler/client.c:138:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:139:7: branch_true: ...to here
cups-2.4.16/scheduler/client.c:139:7: throw: if ‘cupsdPauseListening’ throws an exception...
cups-2.4.16/scheduler/client.c:139:7: danger: ‘con’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  137|     {
#  138|       if (errno == ENFILE || errno == EMFILE)
#  139|->       cupsdPauseListening();
#  140|   
#  141|       cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to accept client connection - %s.",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
cups-2.4.16/scheduler/client.c:141:5: warning[-Wanalyzer-malloc-leak]: leak of ‘con’
cups-2.4.16/scheduler/client.c:103:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:111:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:114:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:122:14: branch_false: ...to here
cups-2.4.16/scheduler/client.c:122:14: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:122:6: branch_false: following ‘false’ branch (when ‘con’ is non-NULL)...
cups-2.4.16/scheduler/client.c:133:17: branch_false: ...to here
cups-2.4.16/scheduler/client.c:136:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:138:9: branch_true: ...to here
cups-2.4.16/scheduler/client.c:141:5: throw: if ‘cupsdLogMessage’ throws an exception...
cups-2.4.16/scheduler/client.c:141:5: danger: ‘con’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  139|         cupsdPauseListening();
#  140|   
#  141|->     cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to accept client connection - %s.",
#  142|                       strerror(errno));
#  143|       free(con);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
cups-2.4.16/scheduler/client.c:154:7: warning[-Wanalyzer-malloc-leak]: leak of ‘con’
cups-2.4.16/scheduler/client.c:103:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:111:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:114:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:122:14: branch_false: ...to here
cups-2.4.16/scheduler/client.c:122:14: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:122:6: branch_false: following ‘false’ branch (when ‘con’ is non-NULL)...
cups-2.4.16/scheduler/client.c:133:17: branch_false: ...to here
cups-2.4.16/scheduler/client.c:136:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:152:3: branch_false: ...to here
cups-2.4.16/scheduler/client.c:154:7: throw: if ‘httpGetFd’ throws an exception...
cups-2.4.16/scheduler/client.c:154:7: danger: ‘con’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  152|     addrlen = sizeof(con->clientaddr);
#  153|   
#  154|->   if (getsockname(httpGetFd(con->http), (struct sockaddr *)&con->clientaddr, &addrlen) || addrlen == 0)
#  155|       con->clientaddr = lis->address;
#  156|   

Error: COMPILER_WARNING (CWE-704): [#def304]
cups-2.4.16/scheduler/client.c: scope_hint: In function ‘cupsdReadClient’
cups-2.4.16/scheduler/client.c:957:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  957 |       if ((ptr = strchr(httpGetField(con->http, HTTP_FIELD_ACCEPT_LANGUAGE),
#      |                ^
#  955|         */
#  956|   
#  957|->       if ((ptr = strchr(httpGetField(con->http, HTTP_FIELD_ACCEPT_LANGUAGE),
#  958|                           ',')) != NULL)
#  959|           *ptr = '\0';

Error: COMPILER_WARNING (CWE-704): [#def305]
cups-2.4.16/scheduler/client.c:957:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  955|         */
#  956|   
#  957|->       if ((ptr = strchr(httpGetField(con->http, HTTP_FIELD_ACCEPT_LANGUAGE),
#  958|                           ',')) != NULL)
#  959|           *ptr = '\0';

Error: COMPILER_WARNING (CWE-704): [#def306]
cups-2.4.16/scheduler/client.c:961:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  961 |       if ((ptr = strchr(httpGetField(con->http, HTTP_FIELD_ACCEPT_LANGUAGE),
#      |                ^
#  959|           *ptr = '\0';
#  960|   
#  961|->       if ((ptr = strchr(httpGetField(con->http, HTTP_FIELD_ACCEPT_LANGUAGE),
#  962|                           ';')) != NULL)
#  963|           *ptr = '\0';

Error: COMPILER_WARNING (CWE-704): [#def307]
cups-2.4.16/scheduler/client.c:961:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  959|           *ptr = '\0';
#  960|   
#  961|->       if ((ptr = strchr(httpGetField(con->http, HTTP_FIELD_ACCEPT_LANGUAGE),
#  962|                           ';')) != NULL)
#  963|           *ptr = '\0';

Error: COMPILER_WARNING (CWE-704): [#def308]
cups-2.4.16/scheduler/client.c:965:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  965 |       if ((ptr = strstr(httpGetField(con->http, HTTP_FIELD_CONTENT_TYPE),
#      |                ^
#  963|           *ptr = '\0';
#  964|   
#  965|->       if ((ptr = strstr(httpGetField(con->http, HTTP_FIELD_CONTENT_TYPE),
#  966|                           "charset=")) != NULL)
#  967|         {

Error: COMPILER_WARNING (CWE-704): [#def309]
cups-2.4.16/scheduler/client.c:965:16: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
#  963|           *ptr = '\0';
#  964|   
#  965|->       if ((ptr = strstr(httpGetField(con->http, HTTP_FIELD_CONTENT_TYPE),
#  966|                           "charset=")) != NULL)
#  967|         {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def310]
cups-2.4.16/scheduler/client.c:1860:23: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.16/scheduler/client.c:672:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:673:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:674:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:687:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:707:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:741:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:936:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.16/scheduler/client.c:1652:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1805:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1815:16: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1828:13: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1833:16: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1835:30: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1835:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1841:36: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1844:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1854:35: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1855:18: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1857:28: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1857:28: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:1858:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.16/scheduler/client.c:1860:23: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1860:23: throw: if ‘context_range_set’ throws an exception...
cups-2.4.16/scheduler/client.c:1860:23: danger: ‘clirange’ leaks here; was allocated at [(25)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/24)
# 1858|   		if ((cliclearance = strtok(clirange, "-")) != NULL)
# 1859|   		{
# 1860|-> 		  if (context_range_set(tmpcon, cliclearance) == -1)
# 1861|   		  {
# 1862|   		    cupsdSendError(con, HTTP_STATUS_SERVER_ERROR, CUPSD_AUTH_NONE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def311]
cups-2.4.16/scheduler/client.c:1872:23: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.16/scheduler/client.c:672:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:673:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:674:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:687:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:707:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:741:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:936:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.16/scheduler/client.c:1652:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1805:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1815:16: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1828:13: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1833:16: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1835:30: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1835:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1841:36: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1844:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1854:35: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1855:18: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1857:28: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1857:28: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:1858:20: branch_false: following ‘false’ branch (when ‘cliclearance’ is NULL)...
cups-2.4.16/scheduler/client.c:1872:23: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1872:23: throw: if ‘context_range_get’ throws an exception...
cups-2.4.16/scheduler/client.c:1872:23: danger: ‘clirange’ leaks here; was allocated at [(25)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/24)
# 1870|   		else
# 1871|   		{
# 1872|-> 		  if (context_range_set(tmpcon, (context_range_get(clicon))) == -1)
# 1873|   		  {
# 1874|   		    cupsdSendError(con, HTTP_STATUS_SERVER_ERROR, CUPSD_AUTH_NONE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def312]
cups-2.4.16/scheduler/client.c:2093:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*con.filename, 0)’
cups-2.4.16/scheduler/client.c:2080:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:2082:10: branch_true: ...to here
cups-2.4.16/scheduler/client.c:2082:10: acquire_resource: opened here
cups-2.4.16/scheduler/client.c:2084:8: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:2093:24: branch_false: ...to here
cups-2.4.16/scheduler/client.c:2093:24: throw: if ‘fcntl’ throws an exception...
cups-2.4.16/scheduler/client.c:2093:24: danger: ‘open(*con.filename, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 2091|       }
# 2092|   
# 2093|->     fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
# 2094|     }
# 2095|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def313]
cups-2.4.16/scheduler/client.c:2139:3: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.16/scheduler/client.c:634:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.16/scheduler/client.c:672:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:673:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:674:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:687:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:707:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:741:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:936:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.16/scheduler/client.c:1652:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1805:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1815:16: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1828:13: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1833:16: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1835:30: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1835:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1841:36: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1844:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1854:35: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1855:18: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1857:28: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1857:28: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:1858:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.16/scheduler/client.c:1860:23: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1860:22: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1862:21: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1862:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2137|   
# 2138|   
# 2139|->   cupsdLogClient(con, CUPSD_LOG_DEBUG2, "cupsdSendError code=%d, auth_type=%d", code, auth_type);
# 2140|   
# 2141|   #ifdef HAVE_TLS

Error: GCC_ANALYZER_WARNING (CWE-401): [#def314]
cups-2.4.16/scheduler/client.c:2160:3: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.16/scheduler/client.c:634:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.16/scheduler/client.c:672:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:673:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:674:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:687:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:707:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:741:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:936:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.16/scheduler/client.c:1652:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1805:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1815:16: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1828:13: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1833:16: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1835:30: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1835:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1841:36: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1844:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1854:35: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1855:18: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1857:28: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1857:28: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:1858:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.16/scheduler/client.c:1860:23: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1860:22: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1862:21: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1862:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2158|     */
# 2159|   
# 2160|->   cupsdLogRequest(con, code);
# 2161|   
# 2162|    /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def315]
cups-2.4.16/scheduler/client.c:2170:21: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.16/scheduler/client.c:634:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.16/scheduler/client.c:672:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:673:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:674:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:687:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:707:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:741:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:936:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.16/scheduler/client.c:1652:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1805:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1815:16: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1828:13: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1833:16: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1835:30: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1835:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1841:36: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1844:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1854:35: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1855:18: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1857:28: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1857:28: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:1858:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.16/scheduler/client.c:1860:23: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1860:22: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1862:21: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1862:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2168|     */
# 2169|   
# 2170|->   strlcpy(location, httpGetField(con->http, HTTP_FIELD_LOCATION), sizeof(location));
# 2171|   
# 2172|     httpClearFields(con->http);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def316]
cups-2.4.16/scheduler/client.c:2172:3: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.16/scheduler/client.c:634:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.16/scheduler/client.c:672:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:673:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:674:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:687:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:707:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:741:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:936:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.16/scheduler/client.c:1652:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1805:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1815:16: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1828:13: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1833:16: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1835:30: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1835:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1841:36: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1844:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1854:35: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1855:18: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1857:28: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1857:28: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:1858:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.16/scheduler/client.c:1860:23: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1860:22: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1862:21: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1862:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2170|     strlcpy(location, httpGetField(con->http, HTTP_FIELD_LOCATION), sizeof(location));
# 2171|   
# 2172|->   httpClearFields(con->http);
# 2173|     httpClearCookie(con->http);
# 2174|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def317]
cups-2.4.16/scheduler/client.c:2173:3: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.16/scheduler/client.c:634:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.16/scheduler/client.c:672:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:673:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:674:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:687:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:707:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:741:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:936:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.16/scheduler/client.c:1652:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1805:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1815:16: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1828:13: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1833:16: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1835:30: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1835:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1841:36: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1844:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1854:35: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1855:18: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1857:28: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1857:28: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:1858:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.16/scheduler/client.c:1860:23: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1860:22: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1862:21: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1862:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2171|   
# 2172|     httpClearFields(con->http);
# 2173|->   httpClearCookie(con->http);
# 2174|   
# 2175|     httpSetField(con->http, HTTP_FIELD_LOCATION, location);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def318]
cups-2.4.16/scheduler/client.c:2175:3: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.16/scheduler/client.c:634:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.16/scheduler/client.c:672:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:673:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:674:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:687:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:707:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:741:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:936:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.16/scheduler/client.c:1652:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1805:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1815:16: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1828:13: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1833:16: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1835:30: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1835:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1841:36: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1844:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1854:35: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1855:18: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1857:28: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1857:28: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:1858:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.16/scheduler/client.c:1860:23: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1860:22: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1862:21: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1862:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2173|     httpClearCookie(con->http);
# 2174|   
# 2175|->   httpSetField(con->http, HTTP_FIELD_LOCATION, location);
# 2176|   
# 2177|     if (code >= HTTP_STATUS_BAD_REQUEST && con->type != CUPSD_AUTH_NEGOTIATE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def319]
cups-2.4.16/scheduler/client.c:2178:5: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.16/scheduler/client.c:634:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.16/scheduler/client.c:672:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:673:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:674:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:687:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:707:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:741:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:936:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.16/scheduler/client.c:1652:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1805:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1815:16: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1828:13: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1833:16: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1835:30: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1835:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1841:36: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1844:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1854:35: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1855:18: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1857:28: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1857:28: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:1858:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.16/scheduler/client.c:1860:23: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1860:22: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1862:21: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1862:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2176|   
# 2177|     if (code >= HTTP_STATUS_BAD_REQUEST && con->type != CUPSD_AUTH_NEGOTIATE)
# 2178|->     httpSetKeepAlive(con->http, HTTP_KEEPALIVE_OFF);
# 2179|   
# 2180|     if (httpGetVersion(con->http) >= HTTP_VERSION_1_1 &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def320]
cups-2.4.16/scheduler/client.c:2180:7: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.16/scheduler/client.c:634:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.16/scheduler/client.c:672:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:673:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:674:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:672:7: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:687:7: branch_false: ...to here
cups-2.4.16/scheduler/client.c:707:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:741:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:936:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.16/scheduler/client.c:1652:11: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1805:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1815:16: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1828:13: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1833:16: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1835:30: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1835:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1841:36: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1844:18: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:1854:35: branch_false: ...to here
cups-2.4.16/scheduler/client.c:1855:18: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1857:28: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1857:28: acquire_memory: allocated here
cups-2.4.16/scheduler/client.c:1858:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.16/scheduler/client.c:1860:23: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1860:22: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/client.c:1862:21: branch_true: ...to here
cups-2.4.16/scheduler/client.c:1862:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2178|       httpSetKeepAlive(con->http, HTTP_KEEPALIVE_OFF);
# 2179|   
# 2180|->   if (httpGetVersion(con->http) >= HTTP_VERSION_1_1 &&
# 2181|         httpGetKeepAlive(con->http) == HTTP_KEEPALIVE_OFF)
# 2182|       httpSetField(con->http, HTTP_FIELD_CONNECTION, "close");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def321]
cups-2.4.16/scheduler/client.c:3460:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 131072)’
cups-2.4.16/scheduler/client.c:3449:8: acquire_resource: opened here
cups-2.4.16/scheduler/client.c:3451:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/client.c:3454:3: branch_false: ...to here
cups-2.4.16/scheduler/client.c:3460:3: danger: ‘open(&fname, 131072)’ leaks here; was opened at [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0)
# 3458|     } while (len < 0 && errno == EINTR);
# 3459|   
# 3460|->   close(in);
# 3461|   
# 3462|     if (len < 0 || len >= sizeof(buf))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def322]
cups-2.4.16/scheduler/colorman.c:1025:13: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1023|     */
# 1024|   
# 1025|->   message = dbus_message_new_method_call(COLORD_DBUS_SERVICE,
# 1026|                                            COLORD_DBUS_PATH,
# 1027|                                            COLORD_DBUS_INTERFACE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def323]
cups-2.4.16/scheduler/colorman.c:1025:13: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1023|     */
# 1024|   
# 1025|->   message = dbus_message_new_method_call(COLORD_DBUS_SERVICE,
# 1026|                                            COLORD_DBUS_PATH,
# 1027|                                            COLORD_DBUS_INTERFACE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def324]
cups-2.4.16/scheduler/colorman.c:1025:13: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1023|     */
# 1024|   
# 1025|->   message = dbus_message_new_method_call(COLORD_DBUS_SERVICE,
# 1026|                                            COLORD_DBUS_PATH,
# 1027|                                            COLORD_DBUS_INTERFACE,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def325]
cups-2.4.16/scheduler/colorman.c:1034:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1032|       goto out;
# 1033|     snprintf(idstr, idstrlen, "%s-%s", printer_name, qualifier);
# 1034|->   cupsdLogMessage(CUPSD_LOG_DEBUG, "Using profile ID \"%s\".", idstr);
# 1035|   
# 1036|     dbus_message_iter_init_append(message, &args);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
cups-2.4.16/scheduler/colorman.c:1034:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1032|       goto out;
# 1033|     snprintf(idstr, idstrlen, "%s-%s", printer_name, qualifier);
# 1034|->   cupsdLogMessage(CUPSD_LOG_DEBUG, "Using profile ID \"%s\".", idstr);
# 1035|   
# 1036|     dbus_message_iter_init_append(message, &args);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
cups-2.4.16/scheduler/colorman.c:1034:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1032|       goto out;
# 1033|     snprintf(idstr, idstrlen, "%s-%s", printer_name, qualifier);
# 1034|->   cupsdLogMessage(CUPSD_LOG_DEBUG, "Using profile ID \"%s\".", idstr);
# 1035|   
# 1036|     dbus_message_iter_init_append(message, &args);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
cups-2.4.16/scheduler/colorman.c:1036:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1034|     cupsdLogMessage(CUPSD_LOG_DEBUG, "Using profile ID \"%s\".", idstr);
# 1035|   
# 1036|->   dbus_message_iter_init_append(message, &args);
# 1037|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &idstr);
# 1038|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &scope);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
cups-2.4.16/scheduler/colorman.c:1036:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1034|     cupsdLogMessage(CUPSD_LOG_DEBUG, "Using profile ID \"%s\".", idstr);
# 1035|   
# 1036|->   dbus_message_iter_init_append(message, &args);
# 1037|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &idstr);
# 1038|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &scope);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
cups-2.4.16/scheduler/colorman.c:1036:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1034|     cupsdLogMessage(CUPSD_LOG_DEBUG, "Using profile ID \"%s\".", idstr);
# 1035|   
# 1036|->   dbus_message_iter_init_append(message, &args);
# 1037|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &idstr);
# 1038|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &scope);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def331]
cups-2.4.16/scheduler/colorman.c:1037:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1035|   
# 1036|     dbus_message_iter_init_append(message, &args);
# 1037|->   dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &idstr);
# 1038|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &scope);
# 1039|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def332]
cups-2.4.16/scheduler/colorman.c:1037:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1035|   
# 1036|     dbus_message_iter_init_append(message, &args);
# 1037|->   dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &idstr);
# 1038|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &scope);
# 1039|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def333]
cups-2.4.16/scheduler/colorman.c:1037:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1035|   
# 1036|     dbus_message_iter_init_append(message, &args);
# 1037|->   dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &idstr);
# 1038|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &scope);
# 1039|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def334]
cups-2.4.16/scheduler/colorman.c:1038:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1036|     dbus_message_iter_init_append(message, &args);
# 1037|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &idstr);
# 1038|->   dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &scope);
# 1039|   
# 1040|     snprintf(format_str, sizeof(format_str), "%s.%s.%s", format[0], format[1],

Error: GCC_ANALYZER_WARNING (CWE-401): [#def335]
cups-2.4.16/scheduler/colorman.c:1038:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1036|     dbus_message_iter_init_append(message, &args);
# 1037|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &idstr);
# 1038|->   dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &scope);
# 1039|   
# 1040|     snprintf(format_str, sizeof(format_str), "%s.%s.%s", format[0], format[1],

Error: GCC_ANALYZER_WARNING (CWE-401): [#def336]
cups-2.4.16/scheduler/colorman.c:1038:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1426:3: call_function: calling ‘colord_create_profile’ from ‘colord_register_printer’
# 1036|     dbus_message_iter_init_append(message, &args);
# 1037|     dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &idstr);
# 1038|->   dbus_message_iter_append_basic(&args, DBUS_TYPE_STRING, &scope);
# 1039|   
# 1040|     snprintf(format_str, sizeof(format_str), "%s.%s.%s", format[0], format[1],

Error: GCC_ANALYZER_WARNING (CWE-401): [#def337]
cups-2.4.16/scheduler/colorman.c:1296:5: warning[-Wanalyzer-malloc-leak]: leak of ‘device_path’
cups-2.4.16/scheduler/colorman.c:1269:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1281:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1282:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1289:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1290:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/colorman.c:1291:19: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1291:19: acquire_memory: allocated here
cups-2.4.16/scheduler/colorman.c:1295:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/colorman.c:1296:5: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1296:5: throw: if ‘dbus_message_unref’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1296:5: danger: ‘device_path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
# 1294|   
# 1295|     if (message)
# 1296|->     dbus_message_unref(message);
# 1297|   
# 1298|     if (reply)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def338]
cups-2.4.16/scheduler/colorman.c:1299:5: warning[-Wanalyzer-malloc-leak]: leak of ‘device_path’
cups-2.4.16/scheduler/colorman.c:1269:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1281:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1282:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1289:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1290:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/colorman.c:1291:19: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1291:19: acquire_memory: allocated here
cups-2.4.16/scheduler/colorman.c:1298:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/colorman.c:1299:5: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1299:5: throw: if ‘dbus_message_unref’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1299:5: danger: ‘device_path’ leaks here; was allocated at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
# 1297|   
# 1298|     if (reply)
# 1299|->     dbus_message_unref(reply);
# 1300|   
# 1301|     return (device_path);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def339]
cups-2.4.16/scheduler/colorman.c:1339:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
# 1337|     */
# 1338|   
# 1339|->   if ((attr = ppdFindAttr(ppd, "cupsICCQualifier2", NULL)) != NULL)
# 1340|       tmp = attr->value;
# 1341|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def340]
cups-2.4.16/scheduler/colorman.c:1350:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
# 1348|     */
# 1349|   
# 1350|->   if ((attr = ppdFindAttr(ppd, "cupsICCQualifier3", NULL)) != NULL)
# 1351|       tmp = attr->value;
# 1352|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def341]
cups-2.4.16/scheduler/colorman.c:1350:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
# 1348|     */
# 1349|   
# 1350|->   if ((attr = ppdFindAttr(ppd, "cupsICCQualifier3", NULL)) != NULL)
# 1351|       tmp = attr->value;
# 1352|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def342]
cups-2.4.16/scheduler/colorman.c:1401:14: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1401:14: throw: if ‘cupsArrayNew3’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1401:14: danger: ‘format[0]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/7)
# 1399|     */
# 1400|   
# 1401|->   profiles = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup,
# 1402|   			   (cups_afree_func_t)free);
# 1403|     for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def343]
cups-2.4.16/scheduler/colorman.c:1401:14: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1401:14: throw: if ‘cupsArrayNew3’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1401:14: danger: ‘format[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/7)
# 1399|     */
# 1400|   
# 1401|->   profiles = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup,
# 1402|   			   (cups_afree_func_t)free);
# 1403|     for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def344]
cups-2.4.16/scheduler/colorman.c:1401:14: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1401:14: throw: if ‘cupsArrayNew3’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1401:14: danger: ‘format[2]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/7)
# 1399|     */
# 1400|   
# 1401|->   profiles = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup,
# 1402|   			   (cups_afree_func_t)free);
# 1403|     for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def345]
cups-2.4.16/scheduler/colorman.c:1403:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1403:15: throw: if ‘ppdFindAttr’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1403:15: danger: ‘format[0]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/7)
# 1401|     profiles = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup,
# 1402|   			   (cups_afree_func_t)free);
# 1403|->   for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
# 1404|          attr;
# 1405|          attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def346]
cups-2.4.16/scheduler/colorman.c:1403:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1403:15: throw: if ‘ppdFindAttr’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1403:15: danger: ‘format[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/7)
# 1401|     profiles = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup,
# 1402|   			   (cups_afree_func_t)free);
# 1403|->   for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
# 1404|          attr;
# 1405|          attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def347]
cups-2.4.16/scheduler/colorman.c:1403:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1403:15: throw: if ‘ppdFindAttr’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1403:15: danger: ‘format[2]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/7)
# 1401|     profiles = cupsArrayNew3(NULL, NULL, NULL, 0, (cups_acopy_func_t)strdup,
# 1402|   			   (cups_afree_func_t)free);
# 1403|->   for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
# 1404|          attr;
# 1405|          attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def348]
cups-2.4.16/scheduler/colorman.c:1405:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.16/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1405:15: throw: if ‘ppdFindNextAttr’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1405:15: danger: ‘format[0]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/7)
# 1403|     for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
# 1404|          attr;
# 1405|->        attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))
# 1406|       if (attr->spec[0] && attr->value && attr->value[0])
# 1407|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def349]
cups-2.4.16/scheduler/colorman.c:1405:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.16/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1405:15: throw: if ‘ppdFindNextAttr’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1405:15: danger: ‘format[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/7)
# 1403|     for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
# 1404|          attr;
# 1405|->        attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))
# 1406|       if (attr->spec[0] && attr->value && attr->value[0])
# 1407|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def350]
cups-2.4.16/scheduler/colorman.c:1405:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.16/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1405:15: throw: if ‘ppdFindNextAttr’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1405:15: danger: ‘format[2]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/7)
# 1403|     for (attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
# 1404|          attr;
# 1405|->        attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))
# 1406|       if (attr->spec[0] && attr->value && attr->value[0])
# 1407|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def351]
cups-2.4.16/scheduler/colorman.c:1414:11: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.16/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1406:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/colorman.c:1408:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/colorman.c:1409:9: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1414:11: throw: if ‘_cupsFileCheck’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1414:11: danger: ‘format[0]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/7)
# 1412|           strlcpy(iccfile, attr->value, sizeof(iccfile));
# 1413|   
# 1414|->       if (_cupsFileCheck(iccfile, _CUPS_FILE_CHECK_FILE, !RunUser,
# 1415|   			 cupsdLogFCMessage, p))
# 1416|   	continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def352]
cups-2.4.16/scheduler/colorman.c:1414:11: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.16/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1406:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/colorman.c:1408:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/colorman.c:1409:9: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1414:11: throw: if ‘_cupsFileCheck’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1414:11: danger: ‘format[1]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/7)
# 1412|           strlcpy(iccfile, attr->value, sizeof(iccfile));
# 1413|   
# 1414|->       if (_cupsFileCheck(iccfile, _CUPS_FILE_CHECK_FILE, !RunUser,
# 1415|   			 cupsdLogFCMessage, p))
# 1416|   	continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def353]
cups-2.4.16/scheduler/colorman.c:1414:11: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.16/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.16/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.16/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.16/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.16/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1406:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/colorman.c:1408:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/colorman.c:1409:9: branch_true: ...to here
cups-2.4.16/scheduler/colorman.c:1414:11: throw: if ‘_cupsFileCheck’ throws an exception...
cups-2.4.16/scheduler/colorman.c:1414:11: danger: ‘format[2]’ leaks here; was allocated at [(8)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/7)
# 1412|           strlcpy(iccfile, attr->value, sizeof(iccfile));
# 1413|   
# 1414|->       if (_cupsFileCheck(iccfile, _CUPS_FILE_CHECK_FILE, !RunUser,
# 1415|   			 cupsdLogFCMessage, p))
# 1416|   	continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def354]
cups-2.4.16/scheduler/conf.c:230:3: warning[-Wanalyzer-malloc-leak]: leak of ‘a’
cups-2.4.16/scheduler/conf.c:3008:1: enter_function: entry to ‘read_cupsd_conf’
cups-2.4.16/scheduler/conf.c:3026:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/conf.c:3032:10: branch_true: ...to here
cups-2.4.16/scheduler/conf.c:3459:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/conf.c:3459:14: branch_true: ...to here
cups-2.4.16/scheduler/conf.c:3463:28: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/conf.c:3464:15: branch_true: ...to here
cups-2.4.16/scheduler/conf.c:3464:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/conf.c:3466:13: branch_true: ...to here
cups-2.4.16/scheduler/conf.c:3470:9: call_function: calling ‘cupsdAddAlias’ from ‘read_cupsd_conf’
#  228|     memcpy(a->name, name, namelen + 1);	/* OK since a->name is allocated */
#  229|   
#  230|->   cupsArrayAdd(aliases, a);
#  231|   }
#  232|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def355]
cups-2.4.16/scheduler/conf.c:3226:9: warning[-Wanalyzer-malloc-leak]: leak of ‘lis’
cups-2.4.16/scheduler/conf.c:3008:1: enter_function: entry to ‘read_cupsd_conf’
cups-2.4.16/scheduler/conf.c:3026:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/conf.c:3032:10: branch_true: ...to here
cups-2.4.16/scheduler/conf.c:3067:13: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/conf.c:3137:16: branch_false: ...to here
cups-2.4.16/scheduler/conf.c:3137:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/conf.c:3156:11: branch_true: ...to here
cups-2.4.16/scheduler/conf.c:3174:18: call_function: calling ‘get_address’ from ‘read_cupsd_conf’
cups-2.4.16/scheduler/conf.c:3174:18: return_function: returning to ‘read_cupsd_conf’ from ‘get_address’
cups-2.4.16/scheduler/conf.c:3176:10: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/conf.c:3176:10: branch_false: ...to here
cups-2.4.16/scheduler/conf.c:3187:29: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
cups-2.4.16/scheduler/conf.c:3193:40: branch_true: ...to here
cups-2.4.16/scheduler/conf.c:3200:12: branch_false: following ‘false’ branch (when ‘lis’ is NULL)...
cups-2.4.16/scheduler/conf.c:3218:20: branch_false: ...to here
cups-2.4.16/scheduler/conf.c:3218:20: acquire_memory: allocated here
cups-2.4.16/scheduler/conf.c:3218:12: branch_false: following ‘false’ branch (when ‘lis’ is non-NULL)...
cups-2.4.16/scheduler/conf.c:3226:9: branch_false: ...to here
cups-2.4.16/scheduler/conf.c:3226:9: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/scheduler/conf.c:3226:9: danger: ‘lis’ leaks here; was allocated at [(24)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/23)
# 3224|   	}
# 3225|   
# 3226|->         cupsArrayAdd(Listeners, lis);
# 3227|   
# 3228|          /*

Error: GCC_ANALYZER_WARNING: [#def356]
cups-2.4.16/scheduler/cupsfilter.c:904:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_true: following ‘true’ branch (when ‘infd > 0’)...
cups-2.4.16/scheduler/cupsfilter.c:904:9: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:904:9: danger: ‘infd’ could be invalid: unchecked value from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  902|         if (infd > 0)
#  903|         {
#  904|->         dup2(infd, 0);
#  905|   	close(infd);
#  906|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def357]
cups-2.4.16/scheduler/cupsfilter.c:905:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_true: following ‘true’ branch (when ‘infd > 0’)...
cups-2.4.16/scheduler/cupsfilter.c:904:9: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:905:9: throw: if ‘close’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:905:9: danger: ‘infd’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  903|         {
#  904|           dup2(infd, 0);
#  905|-> 	close(infd);
#  906|         }
#  907|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def358]
cups-2.4.16/scheduler/cupsfilter.c:912:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_true: following ‘true’ branch (when ‘outfd != 1’)...
cups-2.4.16/scheduler/cupsfilter.c:911:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:911:10: branch_true: following ‘true’ branch (when ‘outfd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:912:17: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:912:17: throw: if ‘open’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:912:17: danger: ‘infd’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  910|       {
#  911|         if (outfd < 0)
#  912|->         outfd = open("/dev/null", O_WRONLY);
#  913|   
#  914|         if (outfd > 1)

Error: GCC_ANALYZER_WARNING: [#def359]
cups-2.4.16/scheduler/cupsfilter.c:916:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘outfd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_true: following ‘true’ branch (when ‘outfd != 1’)...
cups-2.4.16/scheduler/cupsfilter.c:911:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:911:10: branch_true: following ‘true’ branch (when ‘outfd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:912:17: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:912:17: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:914:10: branch_true: following ‘true’ branch (when ‘outfd > 1’)...
cups-2.4.16/scheduler/cupsfilter.c:916:9: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:916:9: danger: ‘outfd’ could be invalid: unchecked value from [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  914|         if (outfd > 1)
#  915|         {
#  916|-> 	dup2(outfd, 1);
#  917|   	close(outfd);
#  918|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def360]
cups-2.4.16/scheduler/cupsfilter.c:917:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_true: following ‘true’ branch (when ‘outfd != 1’)...
cups-2.4.16/scheduler/cupsfilter.c:911:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:911:10: branch_false: following ‘false’ branch (when ‘outfd >= 0’)...
cups-2.4.16/scheduler/cupsfilter.c:914:10: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:914:10: branch_true: following ‘true’ branch (when ‘outfd > 1’)...
cups-2.4.16/scheduler/cupsfilter.c:916:9: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:917:9: throw: if ‘close’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:917:9: danger: ‘infd’ leaks here; was opened at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  915|         {
#  916|   	dup2(outfd, 1);
#  917|-> 	close(outfd);
#  918|         }
#  919|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def361]
cups-2.4.16/scheduler/cupsfilter.c:917:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘outfd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_true: following ‘true’ branch (when ‘outfd != 1’)...
cups-2.4.16/scheduler/cupsfilter.c:911:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:911:10: branch_true: following ‘true’ branch (when ‘outfd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:912:17: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:912:17: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:914:10: branch_true: following ‘true’ branch (when ‘outfd > 1’)...
cups-2.4.16/scheduler/cupsfilter.c:916:9: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:917:9: throw: if ‘close’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:917:9: danger: ‘outfd’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  915|         {
#  916|   	dup2(outfd, 1);
#  917|-> 	close(outfd);
#  918|         }
#  919|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def362]
cups-2.4.16/scheduler/cupsfilter.c:921:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:921:15: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:921:8: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
#  919|       }
#  920|   
#  921|->     if ((fd = open("/dev/null", O_RDWR)) > 3)
#  922|       {
#  923|         dup2(fd, 3);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def363]
cups-2.4.16/scheduler/cupsfilter.c:921:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:921:15: throw: if ‘open’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:921:15: danger: ‘infd’ leaks here; was opened at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  919|       }
#  920|   
#  921|->     if ((fd = open("/dev/null", O_RDWR)) > 3)
#  922|       {
#  923|         dup2(fd, 3);

Error: GCC_ANALYZER_WARNING: [#def364]
cups-2.4.16/scheduler/cupsfilter.c:923:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:921:15: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:921:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/cupsfilter.c:923:7: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:923:7: danger: ‘open("/dev/null", 2)’ could be invalid: unchecked value from [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  921|       if ((fd = open("/dev/null", O_RDWR)) > 3)
#  922|       {
#  923|->       dup2(fd, 3);
#  924|         close(fd);
#  925|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def365]
cups-2.4.16/scheduler/cupsfilter.c:924:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:921:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/cupsfilter.c:923:7: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:924:7: throw: if ‘close’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:924:7: danger: ‘infd’ leaks here; was opened at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  922|       {
#  923|         dup2(fd, 3);
#  924|->       close(fd);
#  925|       }
#  926|       fcntl(3, F_SETFL, O_NDELAY);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def366]
cups-2.4.16/scheduler/cupsfilter.c:924:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:921:15: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:921:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/cupsfilter.c:923:7: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:924:7: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2)
#  922|       {
#  923|         dup2(fd, 3);
#  924|->       close(fd);
#  925|       }
#  926|       fcntl(3, F_SETFL, O_NDELAY);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def367]
cups-2.4.16/scheduler/cupsfilter.c:926:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:926:5: throw: if ‘fcntl’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:926:5: danger: ‘infd’ leaks here; was opened at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  924|         close(fd);
#  925|       }
#  926|->     fcntl(3, F_SETFL, O_NDELAY);
#  927|   
#  928|       if ((fd = open("/dev/null", O_RDWR)) > 4)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def368]
cups-2.4.16/scheduler/cupsfilter.c:928:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:928:15: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:928:8: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  926|       fcntl(3, F_SETFL, O_NDELAY);
#  927|   
#  928|->     if ((fd = open("/dev/null", O_RDWR)) > 4)
#  929|       {
#  930|         dup2(fd, 4);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def369]
cups-2.4.16/scheduler/cupsfilter.c:928:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:928:15: throw: if ‘open’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:928:15: danger: ‘infd’ leaks here; was opened at [(7)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/6)
#  926|       fcntl(3, F_SETFL, O_NDELAY);
#  927|   
#  928|->     if ((fd = open("/dev/null", O_RDWR)) > 4)
#  929|       {
#  930|         dup2(fd, 4);

Error: GCC_ANALYZER_WARNING: [#def370]
cups-2.4.16/scheduler/cupsfilter.c:930:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:928:15: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:928:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/cupsfilter.c:930:7: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:930:7: danger: ‘open("/dev/null", 2)’ could be invalid: unchecked value from [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  928|       if ((fd = open("/dev/null", O_RDWR)) > 4)
#  929|       {
#  930|->       dup2(fd, 4);
#  931|         close(fd);
#  932|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def371]
cups-2.4.16/scheduler/cupsfilter.c:931:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:928:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/cupsfilter.c:930:7: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:931:7: throw: if ‘close’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:931:7: danger: ‘infd’ leaks here; was opened at [(7)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/6)
#  929|       {
#  930|         dup2(fd, 4);
#  931|->       close(fd);
#  932|       }
#  933|       fcntl(4, F_SETFL, O_NDELAY);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def372]
cups-2.4.16/scheduler/cupsfilter.c:931:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:928:15: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:928:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/cupsfilter.c:930:7: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:931:7: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
#  929|       {
#  930|         dup2(fd, 4);
#  931|->       close(fd);
#  932|       }
#  933|       fcntl(4, F_SETFL, O_NDELAY);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def373]
cups-2.4.16/scheduler/cupsfilter.c:933:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:933:5: throw: if ‘fcntl’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:933:5: danger: ‘infd’ leaks here; was opened at [(7)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/6)
#  931|         close(fd);
#  932|       }
#  933|->     fcntl(4, F_SETFL, O_NDELAY);
#  934|   
#  935|      /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def374]
cups-2.4.16/scheduler/cupsfilter.c:941:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.16/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.16/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.16/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.16/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.16/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:941:5: throw: if ‘perror’ throws an exception...
cups-2.4.16/scheduler/cupsfilter.c:941:5: danger: ‘infd’ leaks here; was opened at [(7)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/6)
#  939|       execve(filter, argv, envp);
#  940|   
#  941|->     perror(filter);
#  942|   
#  943|       exit(errno);

Error: GCC_ANALYZER_WARNING (CWE-479): [#def375]
cups-2.4.16/scheduler/cupsfilter.c:1522:3: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
cups-2.4.16/scheduler/cupsfilter.c:1316:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/cupsfilter.c:1322:7: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:1322:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/cupsfilter.c:1333:15: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:1333:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/cupsfilter.c:1341:13: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:1349:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/cupsfilter.c:1356:3: branch_false: ...to here
cups-2.4.16/scheduler/cupsfilter.c:1509:1: enter_function: entry to ‘sighandler’
cups-2.4.16/scheduler/cupsfilter.c:1522:3: danger: call to ‘exit’ from within signal handler
# 1520|     */
# 1521|   
# 1522|->   exit(s);
# 1523|   }
# 1524|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def376]
cups-2.4.16/scheduler/file.c:345:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 129)’
cups-2.4.16/scheduler/file.c:335:13: acquire_resource: opened here
cups-2.4.16/scheduler/file.c:335:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/file.c:343:7: branch_false: ...to here
cups-2.4.16/scheduler/file.c:343:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/file.c:345:5: branch_true: ...to here
cups-2.4.16/scheduler/file.c:345:5: danger: ‘open(filename, 129)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  343|     if (unlink(filename))
#  344|     {
#  345|->     close(fd);
#  346|       return (-1);
#  347|     }

Error: CPPCHECK_WARNING (CWE-476): [#def377]
cups-2.4.16/scheduler/ipp.c:1890: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: userheader
# 1888|           userfooter = strdup(attr->values[1].string.text);
# 1889|   
# 1890|->       if (Classification != NULL && (strcmp(userheader, Classification) == 0)
# 1891|             && userfooter &&(strcmp(userfooter, Classification) == 0))
# 1892|         {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def378]
cups-2.4.16/scheduler/ipp.c:4554:13: warning[-Wanalyzer-malloc-leak]: leak of ‘jobrange’
cups-2.4.16/scheduler/ipp.c:656:1: enter_function: entry to ‘cupsdTimeoutJob’
cups-2.4.16/scheduler/ipp.c:669:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/ipp.c:672:27: branch_false: ...to here
cups-2.4.16/scheduler/ipp.c:675:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/ipp.c:675:7: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/ipp.c:682:5: branch_true: ...to here
cups-2.4.16/scheduler/ipp.c:685:19: call_function: calling ‘copy_banner’ from ‘cupsdTimeoutJob’
# 4552|         if ((jobclearance = strtok(jobrange, "-")) != NULL)
# 4553|         {
# 4554|-> 	if (context_range_set(tmpcon, jobclearance) == -1)
# 4555|   	{
# 4556|   	  cupsdLogJob(job, CUPSD_LOG_ERROR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def379]
cups-2.4.16/scheduler/ipp.c:4556:11: warning[-Wanalyzer-malloc-leak]: leak of ‘jobrange’
cups-2.4.16/scheduler/ipp.c:656:1: enter_function: entry to ‘cupsdTimeoutJob’
cups-2.4.16/scheduler/ipp.c:669:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/ipp.c:672:27: branch_false: ...to here
cups-2.4.16/scheduler/ipp.c:675:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/ipp.c:675:7: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/ipp.c:682:5: branch_true: ...to here
cups-2.4.16/scheduler/ipp.c:685:19: call_function: calling ‘copy_banner’ from ‘cupsdTimeoutJob’
# 4554|   	if (context_range_set(tmpcon, jobclearance) == -1)
# 4555|   	{
# 4556|-> 	  cupsdLogJob(job, CUPSD_LOG_ERROR,
# 4557|   		      "copy_banner: Unable to set the "
# 4558|   		      "level of the context for file %s - %s",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def380]
cups-2.4.16/scheduler/ipp.c:4569:13: warning[-Wanalyzer-malloc-leak]: leak of ‘jobrange’
cups-2.4.16/scheduler/ipp.c:656:1: enter_function: entry to ‘cupsdTimeoutJob’
cups-2.4.16/scheduler/ipp.c:669:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/ipp.c:672:27: branch_false: ...to here
cups-2.4.16/scheduler/ipp.c:675:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/ipp.c:675:7: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/ipp.c:682:5: branch_true: ...to here
cups-2.4.16/scheduler/ipp.c:685:19: call_function: calling ‘copy_banner’ from ‘cupsdTimeoutJob’
# 4567|         else
# 4568|         {
# 4569|-> 	if (context_range_set(tmpcon, (context_range_get(jobcon))) == -1)
# 4570|   	{
# 4571|   	  cupsdLogJob(job, CUPSD_LOG_ERROR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def381]
cups-2.4.16/scheduler/ipp.c:4571:11: warning[-Wanalyzer-malloc-leak]: leak of ‘jobrange’
cups-2.4.16/scheduler/ipp.c:656:1: enter_function: entry to ‘cupsdTimeoutJob’
cups-2.4.16/scheduler/ipp.c:669:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/ipp.c:672:27: branch_false: ...to here
cups-2.4.16/scheduler/ipp.c:675:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/ipp.c:675:7: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/ipp.c:682:5: branch_true: ...to here
cups-2.4.16/scheduler/ipp.c:685:19: call_function: calling ‘copy_banner’ from ‘cupsdTimeoutJob’
# 4569|   	if (context_range_set(tmpcon, (context_range_get(jobcon))) == -1)
# 4570|   	{
# 4571|-> 	  cupsdLogJob(job, CUPSD_LOG_ERROR,
# 4572|   		      "copy_banner: Unable to set the "
# 4573|   		      "level of the context for file %s - %s",

Error: GCC_ANALYZER_WARNING (CWE-404): [#def382]
cups-2.4.16/scheduler/ipp.c:10876:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.16/scheduler/ipp.c:10874:3: acquire_resource: ‘va_start’ called here
cups-2.4.16/scheduler/ipp.c:10876:13: throw: if ‘_cupsLangString’ throws an exception...
cups-2.4.16/scheduler/ipp.c:10876:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#10874|     va_start(ap, message);
#10875|     vsnprintf(formatted, sizeof(formatted),
#10876|->             _cupsLangString(con->language, message), ap);
#10877|     va_end(ap);
#10878|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def383]
cups-2.4.16/scheduler/job.c:1761:21: warning[-Wanalyzer-malloc-leak]: leak of ‘job’
cups-2.4.16/scheduler/job.c:4825:1: enter_function: entry to ‘load_request_root’
cups-2.4.16/scheduler/job.c:4838:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/job.c:4838:6: branch_false: ...to here
cups-2.4.16/scheduler/job.c:4850:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/job.c:4851:16: branch_true: ...to here
cups-2.4.16/scheduler/job.c:4857:18: acquire_memory: allocated here
cups-2.4.16/scheduler/job.c:4857:10: branch_false: following ‘false’ branch (when ‘job’ is non-NULL)...
cups-2.4.16/scheduler/job.c:4868:30: branch_false: ...to here
cups-2.4.16/scheduler/job.c:4878:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/job.c:4879:21: branch_true: ...to here
cups-2.4.16/scheduler/job.c:4885:11: call_function: calling ‘cupsdLoadJob’ from ‘load_request_root’
# 1759|     }
# 1760|   
# 1761|->   if ((job->attrs = ippNew()) == NULL)
# 1762|     {
# 1763|       cupsdLogJob(job, CUPSD_LOG_ERROR, "Ran out of memory for job attributes.");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
cups-2.4.16/scheduler/job.c:1763:5: warning[-Wanalyzer-malloc-leak]: leak of ‘job’
cups-2.4.16/scheduler/job.c:4825:1: enter_function: entry to ‘load_request_root’
cups-2.4.16/scheduler/job.c:4838:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/job.c:4838:6: branch_false: ...to here
cups-2.4.16/scheduler/job.c:4850:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/job.c:4851:16: branch_true: ...to here
cups-2.4.16/scheduler/job.c:4857:18: acquire_memory: allocated here
cups-2.4.16/scheduler/job.c:4857:10: branch_false: following ‘false’ branch (when ‘job’ is non-NULL)...
cups-2.4.16/scheduler/job.c:4868:30: branch_false: ...to here
cups-2.4.16/scheduler/job.c:4885:11: call_function: calling ‘cupsdLoadJob’ from ‘load_request_root’
# 1761|     if ((job->attrs = ippNew()) == NULL)
# 1762|     {
# 1763|->     cupsdLogJob(job, CUPSD_LOG_ERROR, "Ran out of memory for job attributes.");
# 1764|       return (0);
# 1765|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
cups-2.4.16/scheduler/job.c:1771:3: warning[-Wanalyzer-malloc-leak]: leak of ‘job’
cups-2.4.16/scheduler/job.c:4825:1: enter_function: entry to ‘load_request_root’
cups-2.4.16/scheduler/job.c:4838:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/job.c:4838:6: branch_false: ...to here
cups-2.4.16/scheduler/job.c:4850:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/job.c:4851:16: branch_true: ...to here
cups-2.4.16/scheduler/job.c:4857:18: acquire_memory: allocated here
cups-2.4.16/scheduler/job.c:4857:10: branch_false: following ‘false’ branch (when ‘job’ is non-NULL)...
cups-2.4.16/scheduler/job.c:4868:30: branch_false: ...to here
cups-2.4.16/scheduler/job.c:4885:11: call_function: calling ‘cupsdLoadJob’ from ‘load_request_root’
# 1769|     */
# 1770|   
# 1771|->   cupsdLogJob(job, CUPSD_LOG_DEBUG, "Loading attributes...");
# 1772|   
# 1773|     snprintf(jobfile, sizeof(jobfile), "%s/c%05d", RequestRoot, job->id);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
cups-2.4.16/scheduler/job.c:4588:7: warning[-Wanalyzer-malloc-leak]: leak of ‘job’
cups-2.4.16/scheduler/job.c:4505:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/job.c:4515:3: branch_false: ...to here
cups-2.4.16/scheduler/job.c:4521:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/job.c:4523:10: branch_true: ...to here
cups-2.4.16/scheduler/job.c:4530:10: branch_false: following ‘false’ branch (when ‘job’ is NULL)...
cups-2.4.16/scheduler/job.c:4536:11: branch_false: ...to here
cups-2.4.16/scheduler/job.c:4570:13: acquire_memory: allocated here
cups-2.4.16/scheduler/job.c:4571:10: branch_false: following ‘false’ branch (when ‘job’ is non-NULL)...
cups-2.4.16/scheduler/job.c:4578:7: branch_false: ...to here
cups-2.4.16/scheduler/job.c:4588:7: throw: if ‘cupsdLogJob’ throws an exception...
cups-2.4.16/scheduler/job.c:4588:7: danger: ‘job’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
# 4586|         job->status_pipes[1] = -1;
# 4587|   
# 4588|->       cupsdLogJob(job, CUPSD_LOG_DEBUG, "Loading from cache...");
# 4589|       }
# 4590|       else if (!job)

Error: CPPCHECK_WARNING (CWE-758): [#def387]
cups-2.4.16/scheduler/job.c:5914: warning[objectIndex]: The address of variable 'none' might be accessed at non-zero index.
# 5912|   
# 5913|       for (i = 0; i < num_reasons; i ++)
# 5914|->       if (strcmp(job->printer_reasons->values[i].string.text, reasons[i]))
# 5915|           break;
# 5916|   

Error: CPPCHECK_WARNING (CWE-758): [#def388]
cups-2.4.16/scheduler/job.c:5933: warning[objectIndex]: The address of variable 'none' might be accessed at non-zero index.
# 5931|   
# 5932|     for (i = 0; i < num_reasons; i ++)
# 5933|->     job->printer_reasons->values[i].string.text = _cupsStrAlloc(reasons[i]);
# 5934|   
# 5935|     job->dirty = 1;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def389]
cups-2.4.16/scheduler/log.c:616:24: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/log.c:570:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/log.c:593:10: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/log.c:595:3: branch_false: ...to here
cups-2.4.16/scheduler/log.c:597:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/log.c:599:8: branch_true: ...to here
cups-2.4.16/scheduler/log.c:599:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/log.c:609:19: acquire_memory: allocated here
cups-2.4.16/scheduler/log.c:609:10: branch_true: following ‘true’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/log.c:611:22: branch_true: ...to here
cups-2.4.16/scheduler/log.c:615:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/log.c:616:24: branch_true: ...to here
cups-2.4.16/scheduler/log.c:616:24: throw: if ‘cupsArrayNew’ throws an exception...
cups-2.4.16/scheduler/log.c:616:24: danger: ‘temp’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  614|   
#  615|         if (!job->history)
#  616|-> 	job->history = cupsArrayNew(NULL, NULL);
#  617|   
#  618|         if (job->history && temp)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
cups-2.4.16/scheduler/log.c:620:9: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/log.c:570:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/log.c:593:10: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/log.c:595:3: branch_false: ...to here
cups-2.4.16/scheduler/log.c:597:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/log.c:599:8: branch_true: ...to here
cups-2.4.16/scheduler/log.c:599:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/log.c:609:19: acquire_memory: allocated here
cups-2.4.16/scheduler/log.c:609:10: branch_true: following ‘true’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/log.c:611:22: branch_true: ...to here
cups-2.4.16/scheduler/log.c:615:10: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/log.c:618:11: branch_false: ...to here
cups-2.4.16/scheduler/log.c:618:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/log.c:620:9: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/scheduler/log.c:620:9: danger: ‘temp’ leaks here; was allocated at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  618|         if (job->history && temp)
#  619|         {
#  620|-> 	cupsArrayAdd(job->history, temp);
#  621|   
#  622|   	if (cupsArrayCount(job->history) > LogDebugHistory)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def391]
cups-2.4.16/scheduler/log.c:718:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.16/scheduler/log.c:713:11: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/log.c:715:5: acquire_resource: ‘va_start’ called here
cups-2.4.16/scheduler/log.c:718:5: throw: if ‘sd_journal_printv’ throws an exception...
cups-2.4.16/scheduler/log.c:718:5: danger: missing call to ‘va_end’ to match ‘va_start’ at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  716|   
#  717|   #ifdef HAVE_SYSTEMD_SD_JOURNAL_H
#  718|->     sd_journal_printv(log_levels[level], message, ap);
#  719|   
#  720|   #elif defined(HAVE_VSYSLOG)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def392]
cups-2.4.16/scheduler/log.c:739:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.16/scheduler/log.c:732:11: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/log.c:736:11: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.16/scheduler/log.c:738:5: branch_true: ...to here
cups-2.4.16/scheduler/log.c:738:5: acquire_resource: ‘va_start’ called here
cups-2.4.16/scheduler/log.c:739:5: throw: if ‘sd_journal_printv’ throws an exception...
cups-2.4.16/scheduler/log.c:739:5: danger: missing call to ‘va_end’ to match ‘va_start’ at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  737|     {
#  738|       va_start(ap, message);
#  739|->     sd_journal_printv(log_levels[level], message, ap);
#  740|       va_end(ap);
#  741|       return (1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def393]
cups-2.4.16/scheduler/log.c:1311:5: warning[-Wanalyzer-malloc-leak]: leak of ‘log_line’
cups-2.4.16/scheduler/log.c:690:1: enter_function: entry to ‘cupsdLogMessage’
cups-2.4.16/scheduler/log.c:732:11: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/log.c:736:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.16/scheduler/log.c:749:3: branch_false: ...to here
cups-2.4.16/scheduler/log.c:754:14: call_function: calling ‘format_log_line’ from ‘cupsdLogMessage’
cups-2.4.16/scheduler/log.c:754:14: return_function: returning to ‘cupsdLogMessage’ from ‘format_log_line’
cups-2.4.16/scheduler/log.c:757:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/log.c:757:10: branch_true: ...to here
cups-2.4.16/scheduler/log.c:754:14: call_function: calling ‘format_log_line’ from ‘cupsdLogMessage’
# 1309|     {
# 1310|       log_linesize = 8192;
# 1311|->     log_line     = malloc(log_linesize);
# 1312|   
# 1313|       if (!log_line)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def394]
cups-2.4.16/scheduler/log.c:1321:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.16/scheduler/log.c:690:1: enter_function: entry to ‘cupsdLogMessage’
cups-2.4.16/scheduler/log.c:732:11: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/log.c:736:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.16/scheduler/log.c:749:3: branch_false: ...to here
cups-2.4.16/scheduler/log.c:749:3: acquire_resource: ‘va_start’ called here
cups-2.4.16/scheduler/log.c:754:14: call_function: calling ‘format_log_line’ from ‘cupsdLogMessage’
# 1319|     */
# 1320|   
# 1321|->   len = _cups_safe_vsnprintf(log_line, log_linesize, message, ap);
# 1322|   
# 1323|    /*

Error: GCC_ANALYZER_WARNING (CWE-688): [#def395]
cups-2.4.16/scheduler/main.c:341:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ConfigurationFile’ where non-null expected
cups-2.4.16/scheduler/main.c:103:1: enter_function: entry to ‘main’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:332:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/main.c:333:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:333:5: call_function: calling ‘cupsdSetString’ from ‘main’
cups-2.4.16/scheduler/main.c:333:5: return_function: returning to ‘main’ from ‘cupsdSetString’
cups-2.4.16/scheduler/main.c:335:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/main.c:341:11: branch_true: ...to here
cups-2.4.16/scheduler/main.c:341:11: danger: argument 1 (‘ConfigurationFile’) from [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13) could be NULL where non-null expected
#  339|       size_t	len;			/* Size of buffer */
#  340|   
#  341|->     len = strlen(ConfigurationFile) + 15;
#  342|       if ((filename = malloc(len)) == NULL)
#  343|       {

Error: GCC_ANALYZER_WARNING: [#def396]
cups-2.4.16/scheduler/main.c:397:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:395:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:395:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/main.c:397:7: branch_true: ...to here
cups-2.4.16/scheduler/main.c:397:7: danger: ‘i’ could be invalid: unchecked value from [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
#  395|       if ((i = open("/dev/null", O_RDONLY)) != 0)
#  396|       {
#  397|->       dup2(i, 0);
#  398|         close(i);
#  399|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def397]
cups-2.4.16/scheduler/main.c:398:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:395:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:395:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/main.c:397:7: branch_true: ...to here
cups-2.4.16/scheduler/main.c:398:7: throw: if ‘close’ throws an exception...
cups-2.4.16/scheduler/main.c:398:7: danger: ‘i’ leaks here; was opened at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
#  396|       {
#  397|         dup2(i, 0);
#  398|->       close(i);
#  399|       }
#  400|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def398]
cups-2.4.16/scheduler/main.c:401:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:395:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:395:8: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:401:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:401:9: danger: ‘i’ leaks here; was opened at [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8)
#  399|       }
#  400|   
#  401|->     if ((i = open("/dev/null", O_WRONLY)) != 1)
#  402|       {
#  403|         dup2(i, 1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def399]
cups-2.4.16/scheduler/main.c:401:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:395:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:395:8: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:401:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:401:14: throw: if ‘open’ throws an exception...
cups-2.4.16/scheduler/main.c:401:14: danger: ‘i’ leaks here; was opened at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
#  399|       }
#  400|   
#  401|->     if ((i = open("/dev/null", O_WRONLY)) != 1)
#  402|       {
#  403|         dup2(i, 1);

Error: GCC_ANALYZER_WARNING: [#def400]
cups-2.4.16/scheduler/main.c:403:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:401:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:401:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/main.c:403:7: branch_true: ...to here
cups-2.4.16/scheduler/main.c:403:7: danger: ‘i’ could be invalid: unchecked value from [(9)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/8)
#  401|       if ((i = open("/dev/null", O_WRONLY)) != 1)
#  402|       {
#  403|->       dup2(i, 1);
#  404|         close(i);
#  405|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def401]
cups-2.4.16/scheduler/main.c:404:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:401:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:401:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/main.c:403:7: branch_true: ...to here
cups-2.4.16/scheduler/main.c:404:7: throw: if ‘close’ throws an exception...
cups-2.4.16/scheduler/main.c:404:7: danger: ‘i’ leaks here; was opened at [(9)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/8)
#  402|       {
#  403|         dup2(i, 1);
#  404|->       close(i);
#  405|       }
#  406|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def402]
cups-2.4.16/scheduler/main.c:407:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:401:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:401:8: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:407:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:407:9: danger: ‘i’ leaks here; was opened at [(9)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/8)
#  405|       }
#  406|   
#  407|->     if ((i = open("/dev/null", O_WRONLY)) != 2)
#  408|       {
#  409|         dup2(i, 2);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def403]
cups-2.4.16/scheduler/main.c:407:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:401:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:401:8: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:407:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:407:14: throw: if ‘open’ throws an exception...
cups-2.4.16/scheduler/main.c:407:14: danger: ‘i’ leaks here; was opened at [(9)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/8)
#  405|       }
#  406|   
#  407|->     if ((i = open("/dev/null", O_WRONLY)) != 2)
#  408|       {
#  409|         dup2(i, 2);

Error: GCC_ANALYZER_WARNING: [#def404]
cups-2.4.16/scheduler/main.c:409:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:407:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:407:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/main.c:409:7: branch_true: ...to here
cups-2.4.16/scheduler/main.c:409:7: danger: ‘i’ could be invalid: unchecked value from [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
#  407|       if ((i = open("/dev/null", O_WRONLY)) != 2)
#  408|       {
#  409|->       dup2(i, 2);
#  410|         close(i);
#  411|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def405]
cups-2.4.16/scheduler/main.c:410:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:407:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:407:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/main.c:409:7: branch_true: ...to here
cups-2.4.16/scheduler/main.c:410:7: throw: if ‘close’ throws an exception...
cups-2.4.16/scheduler/main.c:410:7: danger: ‘i’ leaks here; was opened at [(9)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/8)
#  408|       {
#  409|         dup2(i, 2);
#  410|->       close(i);
#  411|       }
#  412|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def406]
cups-2.4.16/scheduler/main.c:458:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘i’
cups-2.4.16/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.16/scheduler/main.c:365:6: branch_true: following ‘true’ branch (when ‘disconnect != 0’)...
cups-2.4.16/scheduler/main.c:371:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:380:6: branch_true: following ‘true’ branch (when ‘close_all != 0’)...
cups-2.4.16/scheduler/main.c:386:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:388:17: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:395:14: branch_false: ...to here
cups-2.4.16/scheduler/main.c:407:14: acquire_resource: opened here
cups-2.4.16/scheduler/main.c:407:8: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:420:6: branch_false: ...to here
cups-2.4.16/scheduler/main.c:420:6: branch_true: following ‘true’ branch (when ‘fg == 0’)...
cups-2.4.16/scheduler/main.c:432:5: branch_true: ...to here
cups-2.4.16/scheduler/main.c:449:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/main.c:449:8: branch_true: ...to here
cups-2.4.16/scheduler/main.c:457:14: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/main.c:458:9: branch_true: ...to here
cups-2.4.16/scheduler/main.c:458:9: throw: if ‘sleep’ throws an exception...
cups-2.4.16/scheduler/main.c:458:9: danger: ‘i’ leaks here; was opened at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
#  456|   
#  457|         for (; parent_signal == 0;)
#  458|->         sleep(1);
#  459|   
#  460|         if (parent_signal == SIGUSR1)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def407]
cups-2.4.16/scheduler/main.c:1933:5: warning[-Wanalyzer-malloc-leak]: leak of ‘lis’
cups-2.4.16/scheduler/main.c:1897:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/main.c:1903:3: branch_false: ...to here
cups-2.4.16/scheduler/main.c:1919:6: branch_false: following ‘false’ branch (when ‘lis’ is NULL)...
cups-2.4.16/scheduler/main.c:1925:5: branch_false: ...to here
cups-2.4.16/scheduler/main.c:1927:16: acquire_memory: allocated here
cups-2.4.16/scheduler/main.c:1927:8: branch_false: following ‘false’ branch (when ‘lis’ is non-NULL)...
cups-2.4.16/scheduler/main.c:1933:5: branch_false: ...to here
cups-2.4.16/scheduler/main.c:1933:5: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/scheduler/main.c:1933:5: danger: ‘lis’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
# 1931|       }
# 1932|   
# 1933|->     cupsArrayAdd(Listeners, lis);
# 1934|   
# 1935|       memcpy(&lis->address, &addr, sizeof(lis->address));

Error: CPPCHECK_WARNING (CWE-476): [#def408]
cups-2.4.16/scheduler/mime.c:180: error[ctunullpointer]: Null pointer dereference: mime
#  178|   
#  179|   
#  180|->   if (mime->error_cb)
#  181|     {
#  182|       va_start(ap, message);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def409]
cups-2.4.16/scheduler/mime.c:566:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/scheduler/mime.c:654:1: enter_function: entry to ‘mime_load_convs’
cups-2.4.16/scheduler/mime.c:679:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/mime.c:679:6: branch_false: ...to here
cups-2.4.16/scheduler/mime.c:691:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/mime.c:697:10: branch_true: ...to here
cups-2.4.16/scheduler/mime.c:768:8: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/mime.c:773:9: branch_false: ...to here
cups-2.4.16/scheduler/mime.c:773:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
cups-2.4.16/scheduler/mime.c:779:12: branch_true: ...to here
cups-2.4.16/scheduler/mime.c:779:12: call_function: calling ‘mime_add_fcache’ from ‘mime_load_convs’
#  564|     temp->name = strdup(name);
#  565|   
#  566|->   if (cupsFileFind(name, filterpath, 1, path, sizeof(path)))
#  567|       temp->path = strdup(path);
#  568|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def410]
cups-2.4.16/scheduler/mime.c:566:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/mime.c:654:1: enter_function: entry to ‘mime_load_convs’
cups-2.4.16/scheduler/mime.c:679:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/mime.c:679:6: branch_false: ...to here
cups-2.4.16/scheduler/mime.c:691:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/mime.c:697:10: branch_true: ...to here
cups-2.4.16/scheduler/mime.c:768:8: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/mime.c:773:9: branch_false: ...to here
cups-2.4.16/scheduler/mime.c:773:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
cups-2.4.16/scheduler/mime.c:779:12: branch_true: ...to here
cups-2.4.16/scheduler/mime.c:779:12: call_function: calling ‘mime_add_fcache’ from ‘mime_load_convs’
#  564|     temp->name = strdup(name);
#  565|   
#  566|->   if (cupsFileFind(name, filterpath, 1, path, sizeof(path)))
#  567|       temp->path = strdup(path);
#  568|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def411]
cups-2.4.16/scheduler/mime.c:569:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/scheduler/mime.c:654:1: enter_function: entry to ‘mime_load_convs’
cups-2.4.16/scheduler/mime.c:679:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/mime.c:679:6: branch_false: ...to here
cups-2.4.16/scheduler/mime.c:691:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/mime.c:697:10: branch_true: ...to here
cups-2.4.16/scheduler/mime.c:768:8: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/mime.c:773:9: branch_false: ...to here
cups-2.4.16/scheduler/mime.c:773:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
cups-2.4.16/scheduler/mime.c:779:12: branch_true: ...to here
cups-2.4.16/scheduler/mime.c:779:12: call_function: calling ‘mime_add_fcache’ from ‘mime_load_convs’
#  567|       temp->path = strdup(path);
#  568|   
#  569|->   cupsArrayAdd(filtercache, temp);
#  570|   
#  571|     DEBUG_printf(("3mime_add_fcache: Returning \"%s\".", temp->path));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
cups-2.4.16/scheduler/mime.c:569:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/mime.c:654:1: enter_function: entry to ‘mime_load_convs’
cups-2.4.16/scheduler/mime.c:679:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/mime.c:679:6: branch_false: ...to here
cups-2.4.16/scheduler/mime.c:691:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/mime.c:697:10: branch_true: ...to here
cups-2.4.16/scheduler/mime.c:768:8: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/mime.c:773:9: branch_false: ...to here
cups-2.4.16/scheduler/mime.c:773:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
cups-2.4.16/scheduler/mime.c:779:12: branch_true: ...to here
cups-2.4.16/scheduler/mime.c:779:12: call_function: calling ‘mime_add_fcache’ from ‘mime_load_convs’
#  567|       temp->path = strdup(path);
#  568|   
#  569|->   cupsArrayAdd(filtercache, temp);
#  570|   
#  571|     DEBUG_printf(("3mime_add_fcache: Returning \"%s\".", temp->path));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def413]
cups-2.4.16/scheduler/policy.c:54:5: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/policy.c:40:6: branch_false: following ‘false’ branch (when ‘policy’ is non-NULL)...
cups-2.4.16/scheduler/policy.c:43:7: branch_false: ...to here
cups-2.4.16/scheduler/policy.c:49:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/policy.c:52:15: branch_false: ...to here
cups-2.4.16/scheduler/policy.c:52:15: acquire_memory: allocated here
cups-2.4.16/scheduler/policy.c:52:6: branch_true: following ‘true’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/policy.c:54:5: branch_true: ...to here
cups-2.4.16/scheduler/policy.c:54:5: throw: if ‘cupsdSetString’ throws an exception...
cups-2.4.16/scheduler/policy.c:54:5: danger: ‘temp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   52|     if ((temp = calloc(1, sizeof(cupsd_policy_t))) != NULL)
#   53|     {
#   54|->     cupsdSetString(&temp->name, policy);
#   55|       cupsArrayAdd(Policies, temp);
#   56|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def414]
cups-2.4.16/scheduler/printers.c:88:3: warning[-Wanalyzer-malloc-leak]: leak of ‘p’
cups-2.4.16/scheduler/printers.c:846:1: enter_function: entry to ‘cupsdLoadAllPrinters’
cups-2.4.16/scheduler/printers.c:864:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/printers.c:871:3: branch_false: ...to here
cups-2.4.16/scheduler/printers.c:874:10: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/printers.c:880:10: branch_true: ...to here
cups-2.4.16/scheduler/printers.c:893:10: branch_true: following ‘true’ branch (when ‘p’ is NULL)...
cups-2.4.16/scheduler/printers.c:893:21: branch_true: ...to here
cups-2.4.16/scheduler/printers.c:901:13: call_function: calling ‘cupsdAddPrinter’ from ‘cupsdLoadAllPrinters’
#   86|     }
#   87|   
#   88|->   _cupsRWInit(&p->lock);
#   89|   
#   90|     cupsdSetString(&p->name, name);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def415]
cups-2.4.16/scheduler/process.c:832:9: warning[-Wanalyzer-malloc-leak]: leak of ‘proc’
cups-2.4.16/scheduler/process.c:515:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/process.c:558:5: branch_false: ...to here
cups-2.4.16/scheduler/process.c:574:10: branch_true: following ‘true’ branch (when ‘i != 100’)...
cups-2.4.16/scheduler/process.c:574:74: branch_true: ...to here
cups-2.4.16/scheduler/process.c:821:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/process.c:823:9: branch_true: ...to here
cups-2.4.16/scheduler/process.c:826:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/process.c:828:52: branch_true: ...to here
cups-2.4.16/scheduler/process.c:828:19: acquire_memory: allocated here
cups-2.4.16/scheduler/process.c:828:10: branch_true: following ‘true’ branch (when ‘proc’ is non-NULL)...
cups-2.4.16/scheduler/process.c:830:24: branch_true: ...to here
cups-2.4.16/scheduler/process.c:832:9: throw: if ‘_cups_strcpy’ throws an exception...
cups-2.4.16/scheduler/process.c:832:9: danger: ‘proc’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  830|           proc->pid    = *pid;
#  831|   	proc->job_id = job ? job->id : 0;
#  832|-> 	_cups_strcpy(proc->name, command);
#  833|   
#  834|   	cupsArrayAdd(process_array, proc);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
cups-2.4.16/scheduler/select.c:273:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fdptr’
cups-2.4.16/scheduler/select.c:254:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.16/scheduler/select.c:261:16: branch_false: ...to here
cups-2.4.16/scheduler/select.c:261:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/select.c:267:18: branch_true: ...to here
cups-2.4.16/scheduler/select.c:267:18: acquire_memory: allocated here
cups-2.4.16/scheduler/select.c:267:8: branch_false: following ‘false’ branch (when ‘fdptr’ is non-NULL)...
cups-2.4.16/scheduler/select.c:270:5: branch_false: ...to here
cups-2.4.16/scheduler/select.c:273:10: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/scheduler/select.c:273:10: danger: ‘fdptr’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  271|       fdptr->use = 1;
#  272|   
#  273|->     if (!cupsArrayAdd(cupsd_fds, fdptr))
#  274|       {
#  275|         cupsdLogMessage(CUPSD_LOG_EMERG, "Unable to add fd %d to array!", fd);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def417]
cups-2.4.16/scheduler/subscriptions.c:363:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/scheduler/subscriptions.c:283:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/subscriptions.c:296:7: branch_false: ...to here
cups-2.4.16/scheduler/subscriptions.c:354:15: acquire_memory: allocated here
cups-2.4.16/scheduler/subscriptions.c:354:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/scheduler/subscriptions.c:363:3: branch_false: ...to here
cups-2.4.16/scheduler/subscriptions.c:363:3: throw: if ‘_cupsRWInit’ throws an exception...
cups-2.4.16/scheduler/subscriptions.c:363:3: danger: ‘temp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  361|     }
#  362|   
#  363|->   _cupsRWInit(&temp->lock);
#  364|   
#  365|    /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def418]
cups-2.4.16/scheduler/util.c:257:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
cups-2.4.16/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:257:7: throw: if ‘fcntl’ throws an exception...
cups-2.4.16/scheduler/util.c:257:7: danger: ‘fds[1]’ leaks here
#  255|     */
#  256|   
#  257|->   if (fcntl(fds[0], F_SETFD, fcntl(fds[0], F_GETFD) | FD_CLOEXEC))
#  258|     {
#  259|       close(fds[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def419]
cups-2.4.16/scheduler/util.c:257:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
cups-2.4.16/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:257:30: throw: if ‘fcntl’ throws an exception...
cups-2.4.16/scheduler/util.c:257:30: danger: ‘fds[0]’ leaks here
#  255|     */
#  256|   
#  257|->   if (fcntl(fds[0], F_SETFD, fcntl(fds[0], F_GETFD) | FD_CLOEXEC))
#  258|     {
#  259|       close(fds[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def420]
cups-2.4.16/scheduler/util.c:257:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
cups-2.4.16/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:257:30: throw: if ‘fcntl’ throws an exception...
cups-2.4.16/scheduler/util.c:257:30: danger: ‘fds[1]’ leaks here
#  255|     */
#  256|   
#  257|->   if (fcntl(fds[0], F_SETFD, fcntl(fds[0], F_GETFD) | FD_CLOEXEC))
#  258|     {
#  259|       close(fds[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def421]
cups-2.4.16/scheduler/util.c:259:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
cups-2.4.16/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:257:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/util.c:259:5: branch_true: ...to here
cups-2.4.16/scheduler/util.c:259:5: throw: if ‘close’ throws an exception...
cups-2.4.16/scheduler/util.c:259:5: danger: ‘fds[1]’ leaks here
#  257|     if (fcntl(fds[0], F_SETFD, fcntl(fds[0], F_GETFD) | FD_CLOEXEC))
#  258|     {
#  259|->     close(fds[0]);
#  260|       close(fds[1]);
#  261|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def422]
cups-2.4.16/scheduler/util.c:260:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
cups-2.4.16/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:257:6: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/util.c:259:5: branch_true: ...to here
cups-2.4.16/scheduler/util.c:260:5: throw: if ‘close’ throws an exception...
cups-2.4.16/scheduler/util.c:260:5: danger: ‘fds[1]’ leaks here
#  258|     {
#  259|       close(fds[0]);
#  260|->     close(fds[1]);
#  261|   
#  262|       *pid = 0;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def423]
cups-2.4.16/scheduler/util.c:267:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
cups-2.4.16/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:257:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:267:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:267:30: throw: if ‘fcntl’ throws an exception...
cups-2.4.16/scheduler/util.c:267:30: danger: ‘fds[1]’ leaks here
#  265|     }
#  266|   
#  267|->   if (fcntl(fds[1], F_SETFD, fcntl(fds[1], F_GETFD) | FD_CLOEXEC))
#  268|     {
#  269|       close(fds[0]);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def424]
cups-2.4.16/scheduler/util.c:302:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
cups-2.4.16/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:257:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:267:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:267:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:281:15: branch_false: ...to here
cups-2.4.16/scheduler/util.c:281:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:293:11: branch_false: ...to here
cups-2.4.16/scheduler/util.c:293:11: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/util.c:299:10: branch_true: ...to here
cups-2.4.16/scheduler/util.c:302:15: acquire_resource: opened here
cups-2.4.16/scheduler/util.c:302:8: danger: ‘open("/dev/null", 0)’ leaks here; was opened at [(12)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/11)
#  300|         setuid(user);			/* Run as restricted user */
#  301|   
#  302|->     if ((fd = open("/dev/null", O_RDONLY)) > 0)
#  303|       {
#  304|         dup2(fd, 0);			/* </dev/null */

Error: GCC_ANALYZER_WARNING: [#def425]
cups-2.4.16/scheduler/util.c:304:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 0)’
cups-2.4.16/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:257:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:267:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:267:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:281:15: branch_false: ...to here
cups-2.4.16/scheduler/util.c:281:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:293:11: branch_false: ...to here
cups-2.4.16/scheduler/util.c:293:11: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/util.c:299:10: branch_true: ...to here
cups-2.4.16/scheduler/util.c:302:15: acquire_resource: opened here
cups-2.4.16/scheduler/util.c:302:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/util.c:304:7: branch_true: ...to here
cups-2.4.16/scheduler/util.c:304:7: danger: ‘open("/dev/null", 0)’ could be invalid: unchecked value from [(12)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/11)
#  302|       if ((fd = open("/dev/null", O_RDONLY)) > 0)
#  303|       {
#  304|->       dup2(fd, 0);			/* </dev/null */
#  305|         close(fd);
#  306|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def426]
cups-2.4.16/scheduler/util.c:305:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
cups-2.4.16/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:257:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:267:30: branch_false: ...to here
cups-2.4.16/scheduler/util.c:267:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:281:15: branch_false: ...to here
cups-2.4.16/scheduler/util.c:281:6: branch_false: following ‘false’ branch...
cups-2.4.16/scheduler/util.c:293:11: branch_false: ...to here
cups-2.4.16/scheduler/util.c:293:11: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/util.c:299:10: branch_true: ...to here
cups-2.4.16/scheduler/util.c:302:15: acquire_resource: opened here
cups-2.4.16/scheduler/util.c:302:8: branch_true: following ‘true’ branch...
cups-2.4.16/scheduler/util.c:304:7: branch_true: ...to here
cups-2.4.16/scheduler/util.c:305:7: danger: ‘open("/dev/null", 0)’ leaks here; was opened at [(12)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/11)
#  303|       {
#  304|         dup2(fd, 0);			/* </dev/null */
#  305|->       close(fd);
#  306|       }
#  307|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def427]
cups-2.4.16/tools/ippevepcl.c:286:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/tools/ippevepcl.c:266:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.16/tools/ippevepcl.c:268:15: branch_true: ...to here
cups-2.4.16/tools/ippevepcl.c:268:15: acquire_resource: opened here
cups-2.4.16/tools/ippevepcl.c:268:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippevepcl.c:279:3: branch_false: ...to here
cups-2.4.16/tools/ippevepcl.c:285:10: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippevepcl.c:286:5: branch_true: ...to here
cups-2.4.16/tools/ippevepcl.c:286:5: throw: if ‘write’ throws an exception...
cups-2.4.16/tools/ippevepcl.c:286:5: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  284|   
#  285|     while ((bytes = read(fd, buffer, sizeof(buffer))) > 0)
#  286|->     write(1, buffer, (size_t)bytes);
#  287|   
#  288|    /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def428]
cups-2.4.16/tools/ippevepcl.c:293:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/tools/ippevepcl.c:266:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.16/tools/ippevepcl.c:268:15: branch_true: ...to here
cups-2.4.16/tools/ippevepcl.c:268:15: acquire_resource: opened here
cups-2.4.16/tools/ippevepcl.c:268:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippevepcl.c:279:3: branch_false: ...to here
cups-2.4.16/tools/ippevepcl.c:292:6: branch_true: following ‘true’ branch (when ‘fd != 0’)...
cups-2.4.16/tools/ippevepcl.c:293:5: branch_true: ...to here
cups-2.4.16/tools/ippevepcl.c:293:5: throw: if ‘close’ throws an exception...
cups-2.4.16/tools/ippevepcl.c:293:5: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  291|   
#  292|     if (fd > 0)
#  293|->     close(fd);
#  294|   
#  295|     return (0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def429]
cups-2.4.16/tools/ippevepcl.c:296:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/tools/ippevepcl.c:266:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.16/tools/ippevepcl.c:268:15: branch_true: ...to here
cups-2.4.16/tools/ippevepcl.c:268:15: acquire_resource: opened here
cups-2.4.16/tools/ippevepcl.c:268:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippevepcl.c:279:3: branch_false: ...to here
cups-2.4.16/tools/ippevepcl.c:292:6: branch_false: following ‘false’ branch (when ‘fd == 0’)...
cups-2.4.16/tools/ippevepcl.c:271:14: branch_false: ...to here
cups-2.4.16/tools/ippevepcl.c:296:1: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  294|   
#  295|     return (0);
#  296|-> }
#  297|   
#  298|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def430]
cups-2.4.16/tools/ippevepcl.c:488:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/tools/ippevepcl.c:471:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.16/tools/ippevepcl.c:473:15: branch_true: ...to here
cups-2.4.16/tools/ippevepcl.c:473:15: acquire_resource: opened here
cups-2.4.16/tools/ippevepcl.c:473:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippevepcl.c:488:14: branch_false: ...to here
cups-2.4.16/tools/ippevepcl.c:488:14: throw: if ‘cupsRasterOpen’ throws an exception...
cups-2.4.16/tools/ippevepcl.c:488:14: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#  486|     */
#  487|   
#  488|->   if ((ras = cupsRasterOpen(fd, CUPS_RASTER_READ)) == NULL)
#  489|     {
#  490|       fputs("ERROR: Unable to read raster data, aborting.\n", stderr);

Error: COMPILER_WARNING (CWE-704): [#def431]
cups-2.4.16/tools/ippeveprinter.c: scope_hint: In function ‘create_printer’
cups-2.4.16/tools/ippeveprinter.c:1717:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1717 |     if ((tempptr = strstr(httpGetHostname(NULL, temp, sizeof(temp)), ".lan")) != NULL && !tempptr[5])
#      |                  ^
# 1715|   #endif /* HAVE_AVAHI */
# 1716|   
# 1717|->     if ((tempptr = strstr(httpGetHostname(NULL, temp, sizeof(temp)), ".lan")) != NULL && !tempptr[5])
# 1718|         strlcpy(tempptr, ".local", sizeof(temp) - (size_t)(tempptr - temp));
# 1719|   

Error: CPPCHECK_WARNING (CWE-476): [#def432]
cups-2.4.16/tools/ippeveprinter.c:7435: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: start
# 7433|       char *temptypes = strdup(printer->dnssd_subtypes), *start, *end;
# 7434|   
# 7435|->     for (start = temptypes; *start; start = end)
# 7436|       {
# 7437|         if ((end = strchr(start, ',')) != NULL)

Error: CPPCHECK_WARNING (CWE-476): [#def433]
cups-2.4.16/tools/ippeveprinter.c:7459: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: start
# 7457|       char *temptypes = strdup(printer->dnssd_subtypes), *start, *end;
# 7458|   
# 7459|->     for (start = temptypes; *start; start = end)
# 7460|       {
# 7461|         if ((end = strchr(start, ',')) != NULL)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def434]
cups-2.4.16/tools/ippeveps.c:251:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/tools/ippeveps.c:895:1: enter_function: entry to ‘ps_to_ps’
cups-2.4.16/tools/ippeveps.c:913:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.16/tools/ippeveps.c:915:15: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:915:15: acquire_resource: opened here
cups-2.4.16/tools/ippeveps.c:915:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:931:22: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:949:3: call_function: calling ‘dsc_header’ from ‘ps_to_ps’
#  249|   					/* job-id value */
#  250|   
#  251|->   ppdEmitJCL(ppd, stdout, job_id ? atoi(job_id) : 0, cupsUser(), job_name ? job_name : "Unknown");
#  252|   #endif /* !CUPS_LITE */
#  253|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
cups-2.4.16/tools/ippeveps.c:251:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/tools/ippeveps.c:895:1: enter_function: entry to ‘ps_to_ps’
cups-2.4.16/tools/ippeveps.c:913:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.16/tools/ippeveps.c:915:15: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:915:15: acquire_memory: allocated here
cups-2.4.16/tools/ippeveps.c:915:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:931:22: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:949:3: call_function: calling ‘dsc_header’ from ‘ps_to_ps’
#  249|   					/* job-id value */
#  250|   
#  251|->   ppdEmitJCL(ppd, stdout, job_id ? atoi(job_id) : 0, cupsUser(), job_name ? job_name : "Unknown");
#  252|   #endif /* !CUPS_LITE */
#  253|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def436]
cups-2.4.16/tools/ippeveps.c:287:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  285|         puts("%%EndFeature");
#  286|       }
#  287|->     ppdEmit(ppd, stdout, PPD_ORDER_PROLOG);
#  288|       puts("%%EndProlog");
#  289|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def437]
cups-2.4.16/tools/ippeveps.c:287:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  285|         puts("%%EndFeature");
#  286|       }
#  287|->     ppdEmit(ppd, stdout, PPD_ORDER_PROLOG);
#  288|       puts("%%EndProlog");
#  289|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def438]
cups-2.4.16/tools/ippeveps.c:291:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  289|   
#  290|       puts("%%BeginSetup");
#  291|->     ppdEmit(ppd, stdout, PPD_ORDER_DOCUMENT);
#  292|       ppdEmit(ppd, stdout, PPD_ORDER_ANY);
#  293|       puts("%%EndSetup");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
cups-2.4.16/tools/ippeveps.c:291:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  289|   
#  290|       puts("%%BeginSetup");
#  291|->     ppdEmit(ppd, stdout, PPD_ORDER_DOCUMENT);
#  292|       ppdEmit(ppd, stdout, PPD_ORDER_ANY);
#  293|       puts("%%EndSetup");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def440]
cups-2.4.16/tools/ippeveps.c:292:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  290|       puts("%%BeginSetup");
#  291|       ppdEmit(ppd, stdout, PPD_ORDER_DOCUMENT);
#  292|->     ppdEmit(ppd, stdout, PPD_ORDER_ANY);
#  293|       puts("%%EndSetup");
#  294|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def441]
cups-2.4.16/tools/ippeveps.c:292:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  290|       puts("%%BeginSetup");
#  291|       ppdEmit(ppd, stdout, PPD_ORDER_DOCUMENT);
#  292|->     ppdEmit(ppd, stdout, PPD_ORDER_ANY);
#  293|       puts("%%EndSetup");
#  294|     }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def442]
cups-2.4.16/tools/ippeveps.c:584:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/tools/ippeveps.c:559:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.16/tools/ippeveps.c:561:15: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:561:15: acquire_resource: opened here
cups-2.4.16/tools/ippeveps.c:561:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:577:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:583:8: branch_true: following ‘true’ branch (when ‘fd != 0’)...
cups-2.4.16/tools/ippeveps.c:584:7: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:584:7: throw: if ‘close’ throws an exception...
cups-2.4.16/tools/ippeveps.c:584:7: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  582|   
#  583|       if (fd > 0)
#  584|->       close(fd);
#  585|   
#  586|       return (1);

Error: GCC_ANALYZER_WARNING (CWE-835): [#def443]
cups-2.4.16/tools/ippeveps.c:589:54: warning[-Wanalyzer-infinite-loop]: infinite loop
cups-2.4.16/tools/ippeveps.c:589:54: danger: infinite loop here
cups-2.4.16/tools/ippeveps.c:589:54: branch_true: when ‘bufptr < bufend’: always following ‘true’ branch...
cups-2.4.16/tools/ippeveps.c:595:9: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:595:8: branch_false: if it ever follows ‘false’ branch, it will always do so...
cups-2.4.16/tools/ippeveps.c:595:8: branch_false: ...to here
#  587|     }
#  588|   
#  589|->   for (bufptr = buffer + 2, bufend = buffer + bytes; bufptr < bufend;)
#  590|     {
#  591|      /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def444]
cups-2.4.16/tools/ippeveps.c:679:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/tools/ippeveps.c:559:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.16/tools/ippeveps.c:561:15: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:561:15: acquire_resource: opened here
cups-2.4.16/tools/ippeveps.c:561:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:577:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:579:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:678:8: branch_true: following ‘true’ branch (when ‘fd != 0’)...
cups-2.4.16/tools/ippeveps.c:679:7: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:679:7: throw: if ‘close’ throws an exception...
cups-2.4.16/tools/ippeveps.c:679:7: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
#  677|   
#  678|       if (fd > 0)
#  679|->       close(fd);
#  680|   
#  681|       return (1);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def445]
cups-2.4.16/tools/ippeveps.c:769:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/tools/ippeveps.c:559:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.16/tools/ippeveps.c:561:15: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:561:15: acquire_resource: opened here
cups-2.4.16/tools/ippeveps.c:561:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:577:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:583:8: branch_false: following ‘false’ branch (when ‘fd == 0’)...
cups-2.4.16/tools/ippeveps.c:564:14: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:769:1: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
#  767|   
#  768|     return (0);
#  769|-> }
#  770|   
#  771|   

Error: GCC_ANALYZER_WARNING: [#def446]
cups-2.4.16/tools/ippeveps.c:833:5: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.16/tools/ippeveps.c:832:5: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:832:5: release_resource: closed here
cups-2.4.16/tools/ippeveps.c:833:5: danger: ‘1’ could be invalid
#  831|   
#  832|       close(1);
#  833|->     dup2(tempfd, 1);
#  834|       close(tempfd);
#  835|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def447]
cups-2.4.16/tools/ippeveps.c:958:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  956|         break;
#  957|   
#  958|->     if ((first_pos = ftell(fp)) < 0)
#  959|       {
#  960|         perror("DEBUG: ftell failed");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def448]
cups-2.4.16/tools/ippeveps.c:958:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  956|         break;
#  957|   
#  958|->     if ((first_pos = ftell(fp)) < 0)
#  959|       {
#  960|         perror("DEBUG: ftell failed");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def449]
cups-2.4.16/tools/ippeveps.c:960:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  958|       if ((first_pos = ftell(fp)) < 0)
#  959|       {
#  960|->       perror("DEBUG: ftell failed");
#  961|         first_pos = 0;
#  962|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def450]
cups-2.4.16/tools/ippeveps.c:960:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  958|       if ((first_pos = ftell(fp)) < 0)
#  959|       {
#  960|->       perror("DEBUG: ftell failed");
#  961|         first_pos = 0;
#  962|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def451]
cups-2.4.16/tools/ippeveps.c:976:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  974|         if (fp != stdin)
#  975|         {
#  976|->         if (fseek(fp, first_pos, SEEK_SET) < 0)
#  977|   	{
#  978|   	  perror("ERROR: Unable to seek within PostScript file");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
cups-2.4.16/tools/ippeveps.c:976:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  974|         if (fp != stdin)
#  975|         {
#  976|->         if (fseek(fp, first_pos, SEEK_SET) < 0)
#  977|   	{
#  978|   	  perror("ERROR: Unable to seek within PostScript file");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def453]
cups-2.4.16/tools/ippeveps.c:978:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  976|           if (fseek(fp, first_pos, SEEK_SET) < 0)
#  977|   	{
#  978|-> 	  perror("ERROR: Unable to seek within PostScript file");
#  979|   	  break;
#  980|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
cups-2.4.16/tools/ippeveps.c:978:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.16/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.16/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:882:12: call_function: calling ‘ps_to_ps’ from ‘pdf_to_ps’
#  976|           if (fseek(fp, first_pos, SEEK_SET) < 0)
#  977|   	{
#  978|-> 	  perror("ERROR: Unable to seek within PostScript file");
#  979|   	  break;
#  980|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def455]
cups-2.4.16/tools/ippeveps.c:1064:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.16/tools/ippeveps.c:1047:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.16/tools/ippeveps.c:1049:15: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:1049:15: acquire_resource: opened here
cups-2.4.16/tools/ippeveps.c:1049:8: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:1064:14: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:1064:14: throw: if ‘cupsRasterOpen’ throws an exception...
cups-2.4.16/tools/ippeveps.c:1064:14: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
# 1062|     */
# 1063|   
# 1064|->   if ((ras = cupsRasterOpen(fd, CUPS_RASTER_READ)) == NULL)
# 1065|     {
# 1066|       fputs("ERROR: Unable to read raster data, aborting.\n", stderr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def456]
cups-2.4.16/tools/ippeveps.c:1122:11: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
cups-2.4.16/tools/ippeveps.c:1031:1: enter_function: entry to ‘raster_to_ps’
cups-2.4.16/tools/ippeveps.c:1064:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:1070:3: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:1070:3: call_function: calling ‘dsc_header’ from ‘raster_to_ps’
cups-2.4.16/tools/ippeveps.c:1070:3: return_function: returning to ‘raster_to_ps’ from ‘dsc_header’
cups-2.4.16/tools/ippeveps.c:1072:10: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippeveps.c:1074:5: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:1083:13: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippeveps.c:1089:19: branch_false: ...to here
cups-2.4.16/tools/ippeveps.c:1089:12: acquire_memory: allocated here
cups-2.4.16/tools/ippeveps.c:1120:33: branch_true: following ‘true’ branch (when ‘y != 0’)...
cups-2.4.16/tools/ippeveps.c:1122:11: branch_true: ...to here
cups-2.4.16/tools/ippeveps.c:1122:11: throw: if ‘cupsRasterReadPixels’ throws an exception...
cups-2.4.16/tools/ippeveps.c:1122:11: danger: ‘line’ leaks here; was allocated at [(13)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/12)
# 1120|       for (y = header.cupsHeight; y > 0; y --)
# 1121|       {
# 1122|->       if (cupsRasterReadPixels(ras, line, header.cupsBytesPerLine))
# 1123|         {
# 1124|           if (line[0] != white || memcmp(line, line + 1, header.cupsBytesPerLine - 1))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def457]
cups-2.4.16/tools/ippfind.c:1941:5: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.16/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:6: branch_true: following ‘true’ branch (when ‘myargv’ is NULL)...
cups-2.4.16/tools/ippfind.c:1941:5: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1941:5: throw: if ‘_cupsLangPuts’ throws an exception...
cups-2.4.16/tools/ippfind.c:1941:5: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1939|     if ((myargv = calloc((size_t)(num_args + 1), sizeof(char *))) == NULL)
# 1940|     {
# 1941|->     _cupsLangPuts(stderr, _("ippfind: Out of memory."));
# 1942|       exit(IPPFIND_EXIT_MEMORY);
# 1943|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def458]
cups-2.4.16/tools/ippfind.c:1968:13: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.16/tools/ippfind.c:1947:9: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1954:40: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1956:12: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1956:12: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1962:32: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1962:40: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:1966:14: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1966:14: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1968:13: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1968:13: throw: if ‘_cupsLangPuts’ throws an exception...
cups-2.4.16/tools/ippfind.c:1968:13: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1966|             if (*ptr != '}')
# 1967|             {
# 1968|->             _cupsLangPuts(stderr,
# 1969|                             _("ippfind: Missing close brace in substitution."));
# 1970|               exit(IPPFIND_EXIT_SYNTAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def459]
cups-2.4.16/tools/ippfind.c:1968:13: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.16/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.16/tools/ippfind.c:1947:9: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1954:40: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1956:12: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1956:12: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1962:32: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1962:40: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:1966:14: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1966:14: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1968:13: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1968:13: throw: if ‘_cupsLangPuts’ throws an exception...
cups-2.4.16/tools/ippfind.c:1968:13: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1966|             if (*ptr != '}')
# 1967|             {
# 1968|->             _cupsLangPuts(stderr,
# 1969|                             _("ippfind: Missing close brace in substitution."));
# 1970|               exit(IPPFIND_EXIT_SYNTAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def460]
cups-2.4.16/tools/ippfind.c:2037:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.16/tools/ippfind.c:1947:9: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1954:40: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2009:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2010:19: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:13: throw: if ‘cupsFileFind’ throws an exception...
cups-2.4.16/tools/ippfind.c:2037:13: danger: ‘<unknown>’ leaks here; was allocated at [(12)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/11)
# 2035|     if (strchr(args[0], '/') && !access(args[0], X_OK))
# 2036|       strlcpy(program, args[0], sizeof(program));
# 2037|->   else if (!cupsFileFind(args[0], getenv("PATH"), 1, program, sizeof(program)))
# 2038|     {
# 2039|       _cupsLangPrintf(stderr, _("ippfind: Unable to execute \"%s\": %s"),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def461]
cups-2.4.16/tools/ippfind.c:2037:13: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:13: throw: if ‘cupsFileFind’ throws an exception...
cups-2.4.16/tools/ippfind.c:2037:13: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 2035|     if (strchr(args[0], '/') && !access(args[0], X_OK))
# 2036|       strlcpy(program, args[0], sizeof(program));
# 2037|->   else if (!cupsFileFind(args[0], getenv("PATH"), 1, program, sizeof(program)))
# 2038|     {
# 2039|       _cupsLangPrintf(stderr, _("ippfind: Unable to execute \"%s\": %s"),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def462]
cups-2.4.16/tools/ippfind.c:2037:13: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.16/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:13: throw: if ‘cupsFileFind’ throws an exception...
cups-2.4.16/tools/ippfind.c:2037:13: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 2035|     if (strchr(args[0], '/') && !access(args[0], X_OK))
# 2036|       strlcpy(program, args[0], sizeof(program));
# 2037|->   else if (!cupsFileFind(args[0], getenv("PATH"), 1, program, sizeof(program)))
# 2038|     {
# 2039|       _cupsLangPrintf(stderr, _("ippfind: Unable to execute \"%s\": %s"),

Error: GCC_ANALYZER_WARNING (CWE-401): [#def463]
cups-2.4.16/tools/ippfind.c:2039:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.16/tools/ippfind.c:1947:9: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1954:40: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2009:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2010:19: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:11: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:2039:5: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:2039:5: throw: if ‘_cupsLangPrintf’ throws an exception...
cups-2.4.16/tools/ippfind.c:2039:5: danger: ‘<unknown>’ leaks here; was allocated at [(12)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/11)
# 2037|     else if (!cupsFileFind(args[0], getenv("PATH"), 1, program, sizeof(program)))
# 2038|     {
# 2039|->     _cupsLangPrintf(stderr, _("ippfind: Unable to execute \"%s\": %s"),
# 2040|                       args[0], strerror(ENOENT));
# 2041|       exit(IPPFIND_EXIT_SYNTAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def464]
cups-2.4.16/tools/ippfind.c:2039:5: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:11: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:2039:5: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:2039:5: throw: if ‘_cupsLangPrintf’ throws an exception...
cups-2.4.16/tools/ippfind.c:2039:5: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 2037|     else if (!cupsFileFind(args[0], getenv("PATH"), 1, program, sizeof(program)))
# 2038|     {
# 2039|->     _cupsLangPrintf(stderr, _("ippfind: Unable to execute \"%s\": %s"),
# 2040|                       args[0], strerror(ENOENT));
# 2041|       exit(IPPFIND_EXIT_SYNTAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def465]
cups-2.4.16/tools/ippfind.c:2039:5: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.16/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:11: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:2039:5: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:2039:5: throw: if ‘_cupsLangPrintf’ throws an exception...
cups-2.4.16/tools/ippfind.c:2039:5: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 2037|     else if (!cupsFileFind(args[0], getenv("PATH"), 1, program, sizeof(program)))
# 2038|     {
# 2039|->     _cupsLangPrintf(stderr, _("ippfind: Unable to execute \"%s\": %s"),
# 2040|                       args[0], strerror(ENOENT));
# 2041|       exit(IPPFIND_EXIT_SYNTAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def466]
cups-2.4.16/tools/ippfind.c:2066:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.16/tools/ippfind.c:1947:9: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1954:40: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2009:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2010:19: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:11: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2044:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2055:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2064:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.16/tools/ippfind.c:2067:39: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:2066:5: throw: if ‘_cupsLangPrintf’ throws an exception...
cups-2.4.16/tools/ippfind.c:2066:5: danger: ‘<unknown>’ leaks here; was allocated at [(12)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/11)
# 2064|     else if (pid < 0)
# 2065|     {
# 2066|->     _cupsLangPrintf(stderr, _("ippfind: Unable to execute \"%s\": %s"),
# 2067|                       args[0], strerror(errno));
# 2068|       exit(IPPFIND_EXIT_SYNTAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def467]
cups-2.4.16/tools/ippfind.c:2066:5: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:11: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2044:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2055:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2064:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.16/tools/ippfind.c:2067:39: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:2066:5: throw: if ‘_cupsLangPrintf’ throws an exception...
cups-2.4.16/tools/ippfind.c:2066:5: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
# 2064|     else if (pid < 0)
# 2065|     {
# 2066|->     _cupsLangPrintf(stderr, _("ippfind: Unable to execute \"%s\": %s"),
# 2067|                       args[0], strerror(errno));
# 2068|       exit(IPPFIND_EXIT_SYNTAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def468]
cups-2.4.16/tools/ippfind.c:2066:5: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.16/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:11: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2044:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2055:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2064:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.16/tools/ippfind.c:2067:39: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:2066:5: throw: if ‘_cupsLangPrintf’ throws an exception...
cups-2.4.16/tools/ippfind.c:2066:5: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
# 2064|     else if (pid < 0)
# 2065|     {
# 2066|->     _cupsLangPrintf(stderr, _("ippfind: Unable to execute \"%s\": %s"),
# 2067|                       args[0], strerror(errno));
# 2068|       exit(IPPFIND_EXIT_SYNTAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def469]
cups-2.4.16/tools/ippfind.c:2076:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.16/tools/ippfind.c:1947:9: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:1947:8: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:1954:40: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2009:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2010:19: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:11: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2044:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2055:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2076:12: throw: if ‘wait’ throws an exception...
cups-2.4.16/tools/ippfind.c:2076:12: danger: ‘<unknown>’ leaks here; was allocated at [(12)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/11)
# 2074|       */
# 2075|   
# 2076|->     while (wait(&status) != pid)
# 2077|         ;
# 2078|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def470]
cups-2.4.16/tools/ippfind.c:2076:12: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:11: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2044:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2055:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2076:12: throw: if ‘wait’ throws an exception...
cups-2.4.16/tools/ippfind.c:2076:12: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
# 2074|       */
# 2075|   
# 2076|->     while (wait(&status) != pid)
# 2077|         ;
# 2078|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def471]
cups-2.4.16/tools/ippfind.c:2076:12: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.16/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1914:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:1939:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.16/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2037:11: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2044:7: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2055:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.16/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2076:12: throw: if ‘wait’ throws an exception...
cups-2.4.16/tools/ippfind.c:2076:12: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/0)
# 2074|       */
# 2075|   
# 2076|->     while (wait(&status) != pid)
# 2077|         ;
# 2078|     }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def472]
cups-2.4.16/tools/ippfind.c:2153:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.16/tools/ippfind.c:2146:6: branch_false: following ‘false’ branch (when ‘service’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:2149:23: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2149:23: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:2153:3: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/tools/ippfind.c:2153:3: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
# 2151|     service->regtype  = strdup(regtype);
# 2152|   
# 2153|->   cupsArrayAdd(services, service);
# 2154|   
# 2155|    /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def473]
cups-2.4.16/tools/ippfind.c:2153:3: warning[-Wanalyzer-malloc-leak]: leak of ‘service’
cups-2.4.16/tools/ippfind.c:2146:18: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:2146:6: branch_false: following ‘false’ branch (when ‘service’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:2149:23: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2153:3: throw: if ‘cupsArrayAdd’ throws an exception...
cups-2.4.16/tools/ippfind.c:2153:3: danger: ‘service’ leaks here; was allocated at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 2151|     service->regtype  = strdup(regtype);
# 2152|   
# 2153|->   cupsArrayAdd(services, service);
# 2154|   
# 2155|    /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def474]
cups-2.4.16/tools/ippfind.c:2436:15: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/tools/ippfind.c:2404:15: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:2404:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:2407:3: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2410:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2412:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2412:11: branch_false: following ‘false’ branch (when ‘op != 11’)...
cups-2.4.16/tools/ippfind.c:2434:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2434:6: branch_true: following ‘true’ branch (when ‘regex’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:2436:23: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:2436:15: throw: if ‘regcomp’ throws an exception...
cups-2.4.16/tools/ippfind.c:2436:15: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/0)
# 2434|     if (regex)
# 2435|     {
# 2436|->     int err = regcomp(&(temp->re), regex, REG_NOSUB | REG_ICASE | REG_EXTENDED);
# 2437|   
# 2438|       if (err)

Error: CPPCHECK_WARNING (CWE-401): [#def475]
cups-2.4.16/tools/ippfind.c:2465: error[memleak]: Memory leak: temp.args
# 2463|     }
# 2464|   
# 2465|->   return (temp);
# 2466|   }
# 2467|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def476]
cups-2.4.16/tools/ippfind.c:2466:1: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.16/tools/ippfind.c:2404:15: acquire_memory: allocated here
cups-2.4.16/tools/ippfind.c:2404:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:2407:3: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2410:6: branch_false: following ‘false’ branch...
cups-2.4.16/tools/ippfind.c:2412:11: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2412:11: branch_false: following ‘false’ branch (when ‘op != 11’)...
cups-2.4.16/tools/ippfind.c:2434:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2434:6: branch_false: following ‘false’ branch (when ‘regex’ is NULL)...
cups-2.4.16/tools/ippfind.c:2449:6: branch_false: ...to here
cups-2.4.16/tools/ippfind.c:2449:6: branch_true: following ‘true’ branch (when ‘args’ is non-NULL)...
cups-2.4.16/tools/ippfind.c:2449:6: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:2459:8: branch_true: following ‘true’ branch...
cups-2.4.16/tools/ippfind.c:2459:8: branch_true: ...to here
cups-2.4.16/tools/ippfind.c:2466:1: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/0)
# 2464|   
# 2465|     return (temp);
# 2466|-> }
# 2467|   
# 2468|   /*

Error: GCC_ANALYZER_WARNING (CWE-688): [#def477]
cups-2.4.16/tools/ippfind.c:2594:27: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘strdup(hostTarget)’ where non-null expected
cups-2.4.16/tools/ippfind.c:2591:26: acquire_memory: this call could return NULL
cups-2.4.16/tools/ippfind.c:2594:27: danger: argument 1 (‘strdup(hostTarget)’) from [(1)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
# 2592|     service->port        = port;
# 2593|   
# 2594|->   value = service->host + strlen(service->host) - 1;
# 2595|     if (value >= service->host && *value == '.')
# 2596|       *value = '\0';

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-189.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namecups-2.4.16-4.fc44
store-results-to/tmp/tmpluaqu_mq/cups-2.4.16-4.fc44.tar.xz
time-created2026-01-08 15:46:32
time-finished2026-01-08 15:50:12
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpluaqu_mq/cups-2.4.16-4.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpluaqu_mq/cups-2.4.16-4.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9