cups-2.4.14-2.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.14"
#   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.14/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.14/backend/dnssd.c:901:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/backend/dnssd.c:890:6: branch_false: following ‘false’ branch (when ‘device’ is non-NULL)...
cups-2.4.14/backend/dnssd.c:896:22: branch_false: ...to here
cups-2.4.14/backend/dnssd.c:896:22: acquire_memory: allocated here
cups-2.4.14/backend/dnssd.c:901:3: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/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.14/backend/dnssd.c:901:3: warning[-Wanalyzer-malloc-leak]: leak of ‘device’
cups-2.4.14/backend/dnssd.c:890:17: acquire_memory: allocated here
cups-2.4.14/backend/dnssd.c:890:6: branch_false: following ‘false’ branch (when ‘device’ is non-NULL)...
cups-2.4.14/backend/dnssd.c:896:22: branch_false: ...to here
cups-2.4.14/backend/dnssd.c:901:3: danger: ‘device’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/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.14/backend/failover.c:446:7: warning[-Wanalyzer-malloc-leak]: leak of ‘tok_tmp’
cups-2.4.14/backend/failover.c:425:6: branch_false: following ‘false’ branch...
cups-2.4.14/backend/failover.c:435:3: branch_false: ...to here
cups-2.4.14/backend/failover.c:437:6: branch_true: following ‘true’ branch...
cups-2.4.14/backend/failover.c:439:5: branch_true: ...to here
cups-2.4.14/backend/failover.c:441:15: acquire_memory: allocated here
cups-2.4.14/backend/failover.c:446:7: danger: ‘tok_tmp’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/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-401): [#def11]
cups-2.4.14/backend/failover.c:447:21: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(tmp)’
cups-2.4.14/backend/failover.c:425:6: branch_false: following ‘false’ branch...
cups-2.4.14/backend/failover.c:435:3: branch_false: ...to here
cups-2.4.14/backend/failover.c:437:6: branch_true: following ‘true’ branch...
cups-2.4.14/backend/failover.c:439:5: branch_true: ...to here
cups-2.4.14/backend/failover.c:446:35: acquire_memory: allocated here
cups-2.4.14/backend/failover.c:447:21: danger: ‘strdup(tmp)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/5)
#  445|       {
#  446|         cupsArrayAdd(printer_array, strdup(tmp));
#  447|->     } while ((tmp = strtok(NULL,",")) != NULL);
#  448|   
#  449|       free(tok_tmp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def12]
cups-2.4.14/backend/lpd.c:513:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/lpd.c:163:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/lpd.c:169:12: branch_false: ...to here
cups-2.4.14/backend/lpd.c:169:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:177:17: branch_false: ...to here
cups-2.4.14/backend/lpd.c:235:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.14/backend/lpd.c:407:14: branch_false: ...to here
cups-2.4.14/backend/lpd.c:437:6: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:457:11: branch_false: ...to here
cups-2.4.14/backend/lpd.c:457:11: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/lpd.c:467:16: branch_false: ...to here
cups-2.4.14/backend/lpd.c:467:16: acquire_resource: opened here
cups-2.4.14/backend/lpd.c:469:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:480:3: branch_false: ...to here
cups-2.4.14/backend/lpd.c:491:23: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:500:6: branch_false: ...to here
cups-2.4.14/backend/lpd.c:500:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.14/backend/lpd.c:502:8: branch_true: ...to here
cups-2.4.14/backend/lpd.c:502:8: branch_true: following ‘true’ branch (when ‘manual_copies != 0’)...
cups-2.4.14/backend/lpd.c:504:23: branch_true: ...to here
cups-2.4.14/backend/lpd.c:513:14: danger: ‘fd’ leaks here; was opened at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
#  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): [#def13]
cups-2.4.14/backend/lpd.c:587:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/lpd.c:567:13: acquire_resource: stream socket created here
cups-2.4.14/backend/lpd.c:567:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/backend/lpd.c:574:3: branch_false: ...to here
cups-2.4.14/backend/lpd.c:581:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/lpd.c:587:5: branch_true: ...to here
cups-2.4.14/backend/lpd.c:587:5: danger: ‘fd’ leaks here
#  585|       */
#  586|   
#  587|->     _httpAddrSetPort(&addr, *port);
#  588|   
#  589|      /*

Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
cups-2.4.14/backend/lpd.c:593:56: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/lpd.c:567:13: acquire_resource: stream socket created here
cups-2.4.14/backend/lpd.c:567:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/backend/lpd.c:574:3: branch_false: ...to here
cups-2.4.14/backend/lpd.c:581:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/lpd.c:587:5: branch_true: ...to here
cups-2.4.14/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): [#def15]
cups-2.4.14/backend/lpd.c:622:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/lpd.c:567:13: acquire_resource: stream socket created here
cups-2.4.14/backend/lpd.c:567:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/backend/lpd.c:574:3: branch_false: ...to here
cups-2.4.14/backend/lpd.c:581:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:622:3: branch_false: ...to here
cups-2.4.14/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): [#def16]
cups-2.4.14/backend/lpd.c:754:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/lpd.c:94:1: enter_function: entry to ‘main’
cups-2.4.14/backend/lpd.c:163:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/lpd.c:169:12: branch_false: ...to here
cups-2.4.14/backend/lpd.c:169:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:177:17: branch_false: ...to here
cups-2.4.14/backend/lpd.c:235:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.14/backend/lpd.c:407:14: branch_false: ...to here
cups-2.4.14/backend/lpd.c:437:6: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:457:11: branch_false: ...to here
cups-2.4.14/backend/lpd.c:457:11: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/lpd.c:467:16: branch_false: ...to here
cups-2.4.14/backend/lpd.c:467:16: acquire_resource: opened here
cups-2.4.14/backend/lpd.c:469:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:480:3: branch_false: ...to here
cups-2.4.14/backend/lpd.c:491:23: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:500:6: branch_false: ...to here
cups-2.4.14/backend/lpd.c:500:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.14/backend/lpd.c:502:8: branch_true: ...to here
cups-2.4.14/backend/lpd.c:502:8: branch_true: following ‘true’ branch (when ‘manual_copies != 0’)...
cups-2.4.14/backend/lpd.c:504:23: branch_true: ...to here
cups-2.4.14/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): [#def17]
cups-2.4.14/backend/lpd.c:756:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/lpd.c:94:1: enter_function: entry to ‘main’
cups-2.4.14/backend/lpd.c:163:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/lpd.c:169:12: branch_false: ...to here
cups-2.4.14/backend/lpd.c:169:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:177:17: branch_false: ...to here
cups-2.4.14/backend/lpd.c:235:6: branch_false: following ‘false’ branch (when ‘options’ is NULL)...
cups-2.4.14/backend/lpd.c:407:14: branch_false: ...to here
cups-2.4.14/backend/lpd.c:437:6: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:457:11: branch_false: ...to here
cups-2.4.14/backend/lpd.c:457:11: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/lpd.c:467:16: branch_false: ...to here
cups-2.4.14/backend/lpd.c:467:16: acquire_resource: opened here
cups-2.4.14/backend/lpd.c:469:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:480:3: branch_false: ...to here
cups-2.4.14/backend/lpd.c:491:23: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:500:6: branch_false: ...to here
cups-2.4.14/backend/lpd.c:500:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.14/backend/lpd.c:502:8: branch_true: ...to here
cups-2.4.14/backend/lpd.c:502:8: branch_true: following ‘true’ branch (when ‘manual_copies != 0’)...
cups-2.4.14/backend/lpd.c:504:23: branch_true: ...to here
cups-2.4.14/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): [#def18]
cups-2.4.14/backend/lpd.c:833:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/lpd.c:748:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/lpd.c:754:5: branch_true: ...to here
cups-2.4.14/backend/lpd.c:766:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:773:10: branch_false: ...to here
cups-2.4.14/backend/lpd.c:773:10: branch_false: following ‘false’ branch (when ‘addr’ is non-NULL)...
cups-2.4.14/backend/lpd.c:776:7: branch_false: ...to here
cups-2.4.14/backend/lpd.c:793:19: acquire_resource: stream socket created here
cups-2.4.14/backend/lpd.c:793:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/backend/lpd.c:801:9: branch_false: ...to here
cups-2.4.14/backend/lpd.c:826:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:833:70: branch_false: ...to here
cups-2.4.14/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): [#def19]
cups-2.4.14/backend/lpd.c:833:55: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/lpd.c:748:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/lpd.c:754:5: branch_true: ...to here
cups-2.4.14/backend/lpd.c:766:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:773:10: branch_false: ...to here
cups-2.4.14/backend/lpd.c:773:10: branch_false: following ‘false’ branch (when ‘addr’ is non-NULL)...
cups-2.4.14/backend/lpd.c:776:7: branch_false: ...to here
cups-2.4.14/backend/lpd.c:793:19: acquire_resource: stream socket created here
cups-2.4.14/backend/lpd.c:793:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/backend/lpd.c:801:9: branch_false: ...to here
cups-2.4.14/backend/lpd.c:826:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/lpd.c:833:70: branch_false: ...to here
cups-2.4.14/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-401): [#def20]
cups-2.4.14/backend/snmp.c:321:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/backend/snmp.c:1165:1: enter_function: entry to ‘scan_devices’
cups-2.4.14/backend/snmp.c:1245:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
cups-2.4.14/backend/snmp.c:1245:3: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1247:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/snmp.c:1249:5: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1257:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/snmp.c:1266:9: branch_false: ...to here
cups-2.4.14/backend/snmp.c:1266:8: branch_true: following ‘true’ branch...
cups-2.4.14/backend/snmp.c:1268:7: branch_true: ...to here
cups-2.4.14/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): [#def21]
cups-2.4.14/backend/snmp.c:321:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/backend/snmp.c:1165:1: enter_function: entry to ‘scan_devices’
cups-2.4.14/backend/snmp.c:1245:3: branch_true: following ‘true’ branch (when ‘__i != 16’)...
cups-2.4.14/backend/snmp.c:1245:3: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1247:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/snmp.c:1249:5: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1257:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/snmp.c:1266:9: branch_false: ...to here
cups-2.4.14/backend/snmp.c:1266:8: branch_true: following ‘true’ branch...
cups-2.4.14/backend/snmp.c:1268:7: branch_true: ...to here
cups-2.4.14/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): [#def22]
cups-2.4.14/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): [#def23]
cups-2.4.14/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): [#def24]
cups-2.4.14/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): [#def25]
cups-2.4.14/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): [#def26]
cups-2.4.14/backend/snmp.c:1212:30: warning[-Wanalyzer-malloc-leak]: leak of ‘addrs’
cups-2.4.14/backend/snmp.c:1165:1: enter_function: entry to ‘scan_devices’
cups-2.4.14/backend/snmp.c:1188:8: branch_true: following ‘true’ branch (when ‘address’ is non-NULL)...
cups-2.4.14/backend/snmp.c:1191:10: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1191:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/backend/snmp.c:1192:15: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1192:15: call_function: calling ‘get_interface_addresses’ from ‘scan_devices’
cups-2.4.14/backend/snmp.c:1192:15: return_function: returning to ‘scan_devices’ from ‘get_interface_addresses’
cups-2.4.14/backend/snmp.c:1206:8: branch_false: following ‘false’ branch (when ‘addrs’ is non-NULL)...
cups-2.4.14/backend/snmp.c:1212:30: branch_false: ...to here
cups-2.4.14/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): [#def27]
cups-2.4.14/backend/snmp.c:1222:13: warning[-Wanalyzer-malloc-leak]: leak of ‘addrs’
cups-2.4.14/backend/snmp.c:1165:1: enter_function: entry to ‘scan_devices’
cups-2.4.14/backend/snmp.c:1188:8: branch_true: following ‘true’ branch (when ‘address’ is non-NULL)...
cups-2.4.14/backend/snmp.c:1191:10: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1191:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/backend/snmp.c:1192:15: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1192:15: call_function: calling ‘get_interface_addresses’ from ‘scan_devices’
cups-2.4.14/backend/snmp.c:1192:15: return_function: returning to ‘scan_devices’ from ‘get_interface_addresses’
cups-2.4.14/backend/snmp.c:1206:8: branch_false: following ‘false’ branch (when ‘addrs’ is non-NULL)...
cups-2.4.14/backend/snmp.c:1212:30: branch_false: ...to here
cups-2.4.14/backend/snmp.c:1213:10: branch_true: following ‘true’ branch (when ‘community’ is non-NULL)...
cups-2.4.14/backend/snmp.c:1216:7: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1219:26: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
cups-2.4.14/backend/snmp.c:1222:13: branch_true: ...to here
cups-2.4.14/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): [#def28]
cups-2.4.14/backend/snmp.c:1236:5: warning[-Wanalyzer-malloc-leak]: leak of ‘addrs’
cups-2.4.14/backend/snmp.c:1165:1: enter_function: entry to ‘scan_devices’
cups-2.4.14/backend/snmp.c:1188:8: branch_true: following ‘true’ branch (when ‘address’ is non-NULL)...
cups-2.4.14/backend/snmp.c:1191:10: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1191:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/backend/snmp.c:1192:15: branch_true: ...to here
cups-2.4.14/backend/snmp.c:1192:15: call_function: calling ‘get_interface_addresses’ from ‘scan_devices’
cups-2.4.14/backend/snmp.c:1192:15: return_function: returning to ‘scan_devices’ from ‘get_interface_addresses’
cups-2.4.14/backend/snmp.c:1206:8: branch_false: following ‘false’ branch (when ‘addrs’ is non-NULL)...
cups-2.4.14/backend/snmp.c:1212:30: branch_false: ...to here
cups-2.4.14/backend/snmp.c:1213:10: branch_false: following ‘false’ branch (when ‘community’ is NULL)...
cups-2.4.14/backend/snmp.c:1236:5: branch_false: ...to here
cups-2.4.14/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): [#def29]
cups-2.4.14/backend/snmp.c:1331:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/snmp.c:1324:13: acquire_resource: stream socket created here
cups-2.4.14/backend/snmp.c:1324:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/backend/snmp.c:1331:3: branch_false: ...to here
cups-2.4.14/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): [#def30]
cups-2.4.14/backend/snmp.c:1335:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/snmp.c:1324:13: acquire_resource: stream socket created here
cups-2.4.14/backend/snmp.c:1324:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/backend/snmp.c:1331:3: branch_false: ...to here
cups-2.4.14/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): [#def31]
cups-2.4.14/backend/snmp.c:1335:49: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/backend/snmp.c:1324:13: acquire_resource: stream socket created here
cups-2.4.14/backend/snmp.c:1324:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/backend/snmp.c:1331:3: branch_false: ...to here
cups-2.4.14/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): [#def32]
cups-2.4.14/backend/socket.c:154:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/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): [#def33]
cups-2.4.14/backend/socket.c:156:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:154:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:156:5: branch_true: ...to here
cups-2.4.14/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): [#def34]
cups-2.4.14/backend/socket.c:157:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:154:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:156:5: branch_true: ...to here
cups-2.4.14/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): [#def35]
cups-2.4.14/backend/socket.c:163:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/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): [#def36]
cups-2.4.14/backend/socket.c:225:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.14/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.14/backend/socket.c:190:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/backend/socket.c:201:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:225:12: branch_false: ...to here
cups-2.4.14/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): [#def37]
cups-2.4.14/backend/socket.c:231:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.14/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.14/backend/socket.c:190:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.14/backend/socket.c:225:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:231:20: branch_true: ...to here
cups-2.4.14/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:231:33: branch_false: ...to here
cups-2.4.14/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): [#def38]
cups-2.4.14/backend/socket.c:232:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.14/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.14/backend/socket.c:190:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.14/backend/socket.c:225:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:231:20: branch_true: ...to here
cups-2.4.14/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:231:33: branch_false: ...to here
cups-2.4.14/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:232:20: branch_false: ...to here
cups-2.4.14/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): [#def39]
cups-2.4.14/backend/socket.c:232:55: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.14/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.14/backend/socket.c:190:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.14/backend/socket.c:225:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:231:20: branch_true: ...to here
cups-2.4.14/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:231:33: branch_false: ...to here
cups-2.4.14/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:232:20: branch_false: ...to here
cups-2.4.14/backend/socket.c:231:19: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:232:55: branch_false: ...to here
cups-2.4.14/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): [#def40]
cups-2.4.14/backend/socket.c:234:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.14/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.14/backend/socket.c:190:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/backend/socket.c:201:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:225:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:225:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:234:17: branch_false: ...to here
cups-2.4.14/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): [#def41]
cups-2.4.14/backend/socket.c:240:39: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.14/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.14/backend/socket.c:190:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.14/backend/socket.c:225:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:234:17: branch_false: ...to here
cups-2.4.14/backend/socket.c:234:15: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:240:26: branch_true: ...to here
cups-2.4.14/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:240:39: branch_false: ...to here
cups-2.4.14/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): [#def42]
cups-2.4.14/backend/socket.c:241:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.14/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.14/backend/socket.c:190:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.14/backend/socket.c:225:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:234:17: branch_false: ...to here
cups-2.4.14/backend/socket.c:234:15: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:240:26: branch_true: ...to here
cups-2.4.14/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:240:39: branch_false: ...to here
cups-2.4.14/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:241:26: branch_false: ...to here
cups-2.4.14/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): [#def43]
cups-2.4.14/backend/socket.c:242:26: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.14/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.14/backend/socket.c:190:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/backend/socket.c:201:10: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:202:10: branch_true: ...to here
cups-2.4.14/backend/socket.c:225:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:234:17: branch_false: ...to here
cups-2.4.14/backend/socket.c:234:15: branch_true: following ‘true’ branch...
cups-2.4.14/backend/socket.c:240:26: branch_true: ...to here
cups-2.4.14/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:240:39: branch_false: ...to here
cups-2.4.14/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:241:26: branch_false: ...to here
cups-2.4.14/backend/socket.c:240:25: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:242:26: branch_false: ...to here
cups-2.4.14/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): [#def44]
cups-2.4.14/backend/socket.c:244:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘print_fd’
cups-2.4.14/backend/socket.c:111:6: branch_false: following ‘false’ branch (when ‘argc != 1’)...
cups-2.4.14/backend/socket.c:117:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:117:11: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:130:6: branch_false: ...to here
cups-2.4.14/backend/socket.c:130:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/backend/socket.c:141:21: branch_false: ...to here
cups-2.4.14/backend/socket.c:141:21: acquire_resource: opened here
cups-2.4.14/backend/socket.c:141:8: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:147:14: branch_false: ...to here
cups-2.4.14/backend/socket.c:177:6: branch_true: following ‘true’ branch (when ‘options’ is non-NULL)...
cups-2.4.14/backend/socket.c:184:6: branch_true: ...to here
cups-2.4.14/backend/socket.c:190:12: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/backend/socket.c:201:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:225:12: branch_false: ...to here
cups-2.4.14/backend/socket.c:225:10: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:234:17: branch_false: ...to here
cups-2.4.14/backend/socket.c:234:15: branch_false: following ‘false’ branch...
cups-2.4.14/backend/socket.c:244:17: branch_false: ...to here
cups-2.4.14/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-401): [#def45]
cups-2.4.14/cgi-bin/admin.c:1704:7: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
cups-2.4.14/cgi-bin/admin.c:1248:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1522:12: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1648:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1661:9: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1661:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1681:18: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1681:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1702:37: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1702:19: acquire_memory: allocated here
cups-2.4.14/cgi-bin/admin.c:1702:8: branch_true: following ‘true’ branch (when ‘buffer’ is non-NULL)...
cups-2.4.14/cgi-bin/admin.c:1704:7: branch_true: ...to here
cups-2.4.14/cgi-bin/admin.c:1704:7: danger: ‘buffer’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/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): [#def46]
cups-2.4.14/cgi-bin/admin.c:1726:39: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
cups-2.4.14/cgi-bin/admin.c:1248:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1522:12: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1648:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1661:9: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1661:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1681:18: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1681:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1702:37: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1718:8: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/admin.c:1721:21: acquire_memory: allocated here
cups-2.4.14/cgi-bin/admin.c:1721:10: branch_true: following ‘true’ branch (when ‘buffer’ is non-NULL)...
cups-2.4.14/cgi-bin/admin.c:1723:44: branch_true: ...to here
cups-2.4.14/cgi-bin/admin.c:1726:14: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/admin.c:1728:14: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/admin.c:1730:13: branch_true: ...to here
cups-2.4.14/cgi-bin/admin.c:1726:14: branch_true: following ‘true’ branch (when ‘bufptr < bufend’)...
cups-2.4.14/cgi-bin/admin.c:1726:39: branch_true: ...to here
cups-2.4.14/cgi-bin/admin.c:1726:39: danger: ‘buffer’ 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): [#def47]
cups-2.4.14/cgi-bin/admin.c:1726:39: warning[-Wanalyzer-malloc-leak]: leak of ‘bufptr’
cups-2.4.14/cgi-bin/admin.c:1248:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1522:12: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1648:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1661:9: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1661:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1681:18: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1681:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1702:37: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1718:8: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/admin.c:1721:21: acquire_memory: allocated here
cups-2.4.14/cgi-bin/admin.c:1721:10: branch_true: following ‘true’ branch (when ‘buffer’ is non-NULL)...
cups-2.4.14/cgi-bin/admin.c:1723:44: branch_true: ...to here
cups-2.4.14/cgi-bin/admin.c:1726:14: branch_true: following ‘true’ branch (when ‘bufptr < bufend’)...
cups-2.4.14/cgi-bin/admin.c:1726:39: branch_true: ...to here
cups-2.4.14/cgi-bin/admin.c:1726:39: danger: ‘bufptr’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/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): [#def48]
cups-2.4.14/cgi-bin/admin.c:1749:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer’
cups-2.4.14/cgi-bin/admin.c:1248:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1522:12: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1648:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1661:9: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1661:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1681:18: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1681:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1702:37: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1718:8: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/admin.c:1721:21: acquire_memory: allocated here
cups-2.4.14/cgi-bin/admin.c:1721:10: branch_true: following ‘true’ branch (when ‘buffer’ is non-NULL)...
cups-2.4.14/cgi-bin/admin.c:1723:44: branch_true: ...to here
cups-2.4.14/cgi-bin/admin.c:1726:14: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/admin.c:1728:14: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1733:19: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1733:19: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1738:19: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1738:19: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/admin.c:1743:19: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1743:19: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/admin.c:1744:14: branch_true: ...to here
cups-2.4.14/cgi-bin/admin.c:1726:14: branch_false: following ‘false’ branch (when ‘bufptr >= bufend’)...
cups-2.4.14/cgi-bin/admin.c:1747:9: branch_false: ...to here
cups-2.4.14/cgi-bin/admin.c:1749:9: danger: ‘buffer’ leaks here; was allocated at [(11)](sarif:/runs/0/results/3/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): [#def49]
cups-2.4.14/cgi-bin/admin.c:1987:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(*attr.values[0].string.text)’
cups-2.4.14/cgi-bin/admin.c:1968:6: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/admin.c:1983:23: branch_true: ...to here
cups-2.4.14/cgi-bin/admin.c:1986:10: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.14/cgi-bin/admin.c:1989:44: branch_true: ...to here
cups-2.4.14/cgi-bin/admin.c:1989:37: acquire_memory: allocated here
cups-2.4.14/cgi-bin/admin.c:1987:17: danger: ‘strdup(*attr.values[0].string.text)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
# 1985|       for (attr = ippFindAttribute(response, "device-uri", IPP_TAG_URI);
# 1986|            attr;
# 1987|-> 	 attr = ippFindNextAttribute(response, "device-uri", IPP_TAG_URI))
# 1988|       {
# 1989|         cupsArrayAdd(printer_devices, strdup(attr->values[0].string.text));

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

Error: CPPCHECK_WARNING (CWE-457): [#def52]
cups-2.4.14/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): [#def53]
cups-2.4.14/cgi-bin/help.c:178:11: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/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): [#def54]
cups-2.4.14/cgi-bin/help.c:180:3: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/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): [#def55]
cups-2.4.14/cgi-bin/help.c:182:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.14/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): [#def56]
cups-2.4.14/cgi-bin/help.c:184:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:183:6: branch_true: following ‘true’ branch (when ‘topic’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:184:5: branch_true: ...to here
cups-2.4.14/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): [#def57]
cups-2.4.14/cgi-bin/help.c:186:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:101:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:103:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:105:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:115:5: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:120:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:132:14: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:132:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:146:5: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:185:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:186:5: branch_true: ...to here
cups-2.4.14/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): [#def58]
cups-2.4.14/cgi-bin/help.c:188:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:101:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:103:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:105:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:115:5: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:120:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:132:14: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:132:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:146:5: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:185:6: branch_true: following ‘true’ branch (when ‘helpfile’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:186:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:187:6: branch_true: following ‘true’ branch (when ‘helptitle’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:188:5: branch_true: ...to here
cups-2.4.14/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): [#def59]
cups-2.4.14/cgi-bin/help.c:198:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:185:6: branch_false: following ‘false’ branch (when ‘helpfile’ is NULL)...
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: following ‘false’ branch (when ‘helptitle’ is NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:193:6: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:198:5: branch_true: ...to here
cups-2.4.14/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): [#def60]
cups-2.4.14/cgi-bin/help.c:202:36: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:185:6: branch_false: following ‘false’ branch (when ‘helpfile’ is NULL)...
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: following ‘false’ branch (when ‘helptitle’ is NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:193:6: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:198:5: branch_true: ...to here
cups-2.4.14/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): [#def61]
cups-2.4.14/cgi-bin/help.c:237:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:185:6: branch_false: following ‘false’ branch (when ‘helpfile’ is NULL)...
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: following ‘false’ branch (when ‘helptitle’ is NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:193:6: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:198:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:203:10: branch_false: following ‘false’ branch (when ‘n’ is NULL)...
cups-2.4.14/cgi-bin/help.c:237:5: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:237:5: danger: ‘query’ leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  235|       }
#  236|   
#  237|->     helpDeleteIndex(si);
#  238|     }
#  239|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
cups-2.4.14/cgi-bin/help.c:244:50: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:185:6: branch_false: following ‘false’ branch (when ‘helpfile’ is NULL)...
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: following ‘false’ branch (when ‘helptitle’ is NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:244:50: danger: ‘query’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  242|     */
#  243|   
#  244|->   for (i = 0, section = NULL, n = (help_node_t *)cupsArrayFirst(hi->sorted);
#  245|          n;
#  246|          n = (help_node_t *)cupsArrayNext(hi->sorted))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
cups-2.4.14/cgi-bin/help.c:262:7: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:185:6: branch_false: following ‘false’ branch (when ‘helpfile’ is NULL)...
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: following ‘false’ branch (when ‘helptitle’ is NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:245:8: branch_true: following ‘true’ branch (when ‘n’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:248:9: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:248:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:255:9: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:255:8: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:262:7: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:262:7: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:262:7: danger: ‘query’ leaks here; was allocated at [(7)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/6)
#  260|         */
#  261|   
#  262|->       snprintf(line, sizeof(line), "/help/?TOPIC=%s&QUERY=%s",
#  263|                  cgiFormEncode(topic_data, n->section, sizeof(topic_data)),
#  264|   	       query ? query : "");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
cups-2.4.14/cgi-bin/help.c:322:5: warning[-Wanalyzer-malloc-leak]: leak of ‘query’
cups-2.4.14/cgi-bin/help.c:79:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:91:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:173:6: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/help.c:175:21: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:175:11: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:176:13: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:176:13: acquire_memory: allocated here
cups-2.4.14/cgi-bin/help.c:181:6: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:182:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:185:6: branch_false: following ‘false’ branch (when ‘helpfile’ is NULL)...
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:187:6: branch_false: following ‘false’ branch (when ‘helptitle’ is NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: following ‘true’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/help.c:190:3: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:245:8: branch_false: following ‘false’ branch (when ‘n’ is NULL)...
cups-2.4.14/cgi-bin/help.c:321:7: branch_false: ...to here
cups-2.4.14/cgi-bin/help.c:321:6: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/help.c:322:5: branch_true: ...to here
cups-2.4.14/cgi-bin/help.c:322:5: danger: ‘query’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/6)
#  320|   
#  321|     if (!helpfile || !printable)
#  322|->     cgiCopyTemplateLang("help-header.tmpl");
#  323|     else
#  324|       cgiCopyTemplateLang("help-printable.tmpl");

Error: GCC_ANALYZER_WARNING (CWE-688): [#def65]
cups-2.4.14/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.14/cgi-bin/ipp-var.c:1347:1: enter_function: entry to ‘cgiShowJobs’
cups-2.4.14/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-775): [#def66]
cups-2.4.14/cgi-bin/ipp-var.c:137:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, "r")’
cups-2.4.14/cgi-bin/ipp-var.c:1347:1: enter_function: entry to ‘cgiShowJobs’
cups-2.4.14/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): [#def67]
cups-2.4.14/cgi-bin/ipp-var.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs[1]’
cups-2.4.14/cgi-bin/ipp-var.c:1347:1: enter_function: entry to ‘cgiShowJobs’
cups-2.4.14/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): [#def68]
cups-2.4.14/cgi-bin/ipp-var.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of ‘attrs[first]’
cups-2.4.14/cgi-bin/ipp-var.c:1347:1: enter_function: entry to ‘cgiShowJobs’
cups-2.4.14/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): [#def69]
cups-2.4.14/cgi-bin/ipp-var.c:137:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, "r")’
cups-2.4.14/cgi-bin/ipp-var.c:1347:1: enter_function: entry to ‘cgiShowJobs’
cups-2.4.14/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): [#def70]
cups-2.4.14/cgi-bin/search.c:136:23: warning[-Wanalyzer-malloc-leak]: leak of ‘re’
cups-2.4.14/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:51:24: acquire_memory: allocated here
cups-2.4.14/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:136:8: branch_true: following ‘true’ branch (when ‘wlen == 3’)...
cups-2.4.14/cgi-bin/search.c:136:23: branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:136:23: danger: ‘re’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/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): [#def71]
cups-2.4.14/cgi-bin/search.c:136:23: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
cups-2.4.14/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:64:20: acquire_memory: allocated here
cups-2.4.14/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:136:8: branch_true: following ‘true’ branch (when ‘wlen == 3’)...
cups-2.4.14/cgi-bin/search.c:136:23: branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:136:23: danger: ‘s’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/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): [#def72]
cups-2.4.14/cgi-bin/search.c:147:28: warning[-Wanalyzer-malloc-leak]: leak of ‘re’
cups-2.4.14/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:51:24: acquire_memory: allocated here
cups-2.4.14/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:147:13: branch_true: following ‘true’ branch (when ‘wlen == 2’)...
cups-2.4.14/cgi-bin/search.c:147:28: branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:147:28: danger: ‘re’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/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): [#def73]
cups-2.4.14/cgi-bin/search.c:147:28: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
cups-2.4.14/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:64:20: acquire_memory: allocated here
cups-2.4.14/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:147:13: branch_true: following ‘true’ branch (when ‘wlen == 2’)...
cups-2.4.14/cgi-bin/search.c:147:28: branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:147:28: danger: ‘s’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/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): [#def74]
cups-2.4.14/cgi-bin/search.c:296:7: warning[-Wanalyzer-malloc-leak]: leak of ‘re’
cups-2.4.14/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:51:24: acquire_memory: allocated here
cups-2.4.14/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:136:9: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/search.c:147:13: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:166:10: branch_false: following ‘false’ branch (when ‘lword’ is NULL)...
cups-2.4.14/cgi-bin/search.c:169:10: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:169:10: branch_false: following ‘false’ branch (when ‘slen >= wlen’)...
cups-2.4.14/cgi-bin/search.c:200:28: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:210:14: branch_false: following ‘false’ branch (when ‘qptr >= qend’)...
cups-2.4.14/cgi-bin/search.c:222:7: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:258:12: branch_false: following ‘false’ branch (when ‘lword’ is NULL)...
cups-2.4.14/cgi-bin/search.c:261:17: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:278:6: branch_true: following ‘true’ branch (when ‘s < sptr’)...
cups-2.4.14/cgi-bin/search.c:279:5: branch_true: ...to here
cups-2.4.14/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): [#def75]
cups-2.4.14/cgi-bin/search.c:296:7: warning[-Wanalyzer-malloc-leak]: leak of ‘s’
cups-2.4.14/cgi-bin/search.c:44:6: branch_false: following ‘false’ branch (when ‘query’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:51:24: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:51:6: branch_false: following ‘false’ branch (when ‘re’ is non-NULL)...
cups-2.4.14/cgi-bin/search.c:60:10: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:64:20: acquire_memory: allocated here
cups-2.4.14/cgi-bin/search.c:64:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:80:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:89:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/search.c:96:9: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:136:9: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/search.c:147:13: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:166:10: branch_false: following ‘false’ branch (when ‘lword’ is NULL)...
cups-2.4.14/cgi-bin/search.c:169:10: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:169:10: branch_false: following ‘false’ branch (when ‘slen >= wlen’)...
cups-2.4.14/cgi-bin/search.c:200:28: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:210:14: branch_false: following ‘false’ branch (when ‘qptr >= qend’)...
cups-2.4.14/cgi-bin/search.c:222:7: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:258:12: branch_false: following ‘false’ branch (when ‘lword’ is NULL)...
cups-2.4.14/cgi-bin/search.c:261:17: branch_false: ...to here
cups-2.4.14/cgi-bin/search.c:278:6: branch_true: following ‘true’ branch (when ‘s < sptr’)...
cups-2.4.14/cgi-bin/search.c:279:5: branch_true: ...to here
cups-2.4.14/cgi-bin/search.c:296:7: danger: ‘s’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  294|     */
#  295|   
#  296|->   if (regcomp(re, s, REG_EXTENDED | REG_ICASE))
#  297|     {
#  298|       free(re);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def76]
cups-2.4.14/cgi-bin/var.c:642:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp_vars’
cups-2.4.14/cgi-bin/var.c:619:6: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/var.c:624:8: branch_true: ...to here
cups-2.4.14/cgi-bin/var.c:624:8: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/var.c:627:46: branch_false: ...to here
cups-2.4.14/cgi-bin/var.c:629:8: branch_false: following ‘false’ branch (when ‘temp_vars’ is non-NULL)...
cups-2.4.14/cgi-bin/var.c:632:21: branch_false: ...to here
cups-2.4.14/cgi-bin/var.c:634:8: branch_true: following ‘true’ branch...
cups-2.4.14/cgi-bin/var.c:640:10: branch_true: ...to here
cups-2.4.14/cgi-bin/var.c:640:10: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/var.c:642:7: branch_false: ...to here
cups-2.4.14/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: GCC_ANALYZER_WARNING (CWE-401): [#def77]
cups-2.4.14/cgi-bin/var.c:672:10: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cups-2.4.14/cgi-bin/var.c:1052:1: enter_function: entry to ‘cgi_initialize_post’
cups-2.4.14/cgi-bin/var.c:1067:6: branch_false: following ‘false’ branch (when ‘content_length’ is non-NULL)...
cups-2.4.14/cgi-bin/var.c:1067:33: call_function: inlined call to ‘atoi’ from ‘cgi_initialize_post’
cups-2.4.14/cgi-bin/var.c:1067:7: branch_false: following ‘false’ branch...
cups-2.4.14/cgi-bin/var.c:1074:20: branch_false: ...to here
cups-2.4.14/cgi-bin/var.c:1075:12: acquire_memory: allocated here
cups-2.4.14/cgi-bin/var.c:1077:6: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/cgi-bin/var.c:1114:12: call_function: calling ‘cgi_initialize_string’ from ‘cgi_initialize_post’
#  670|       const _cgi_var_t *v2)		/* I - Second variable */
#  671|   {
#  672|->   return (_cups_strcasecmp(v1->name, v2->name));
#  673|   }
#  674|   

Error: CPPCHECK_WARNING (CWE-457): [#def78]
cups-2.4.14/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: GCC_ANALYZER_WARNING (CWE-401): [#def79]
cups-2.4.14/cups/array.c:407:27: warning[-Wanalyzer-malloc-leak]: leak of ‘da’
cups-2.4.14/cups/array.c:361:6: branch_false: following ‘false’ branch (when ‘a’ is non-NULL)...
cups-2.4.14/cups/array.c:368:8: branch_false: ...to here
cups-2.4.14/cups/array.c:368:8: acquire_memory: allocated here
cups-2.4.14/cups/array.c:369:6: branch_false: following ‘false’ branch (when ‘da’ is non-NULL)...
cups-2.4.14/cups/array.c:372:19: branch_false: ...to here
cups-2.4.14/cups/array.c:381:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/array.c:387:27: branch_true: ...to here
cups-2.4.14/cups/array.c:388:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/array.c:398:9: branch_false: ...to here
cups-2.4.14/cups/array.c:398:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/array.c:406:19: branch_true: following ‘true’ branch...
cups-2.4.14/cups/array.c:407:27: branch_true: ...to here
cups-2.4.14/cups/array.c:407:27: danger: ‘da’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  405|   
#  406|         for (i = 0; i < a->num_elements; i ++)
#  407|-> 	da->elements[i] = (a->copyfunc)(a->elements[i], a->data);
#  408|       }
#  409|       else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def80]
cups-2.4.14/cups/array.c:407:27: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)*a.num_elements * 8)’
cups-2.4.14/cups/array.c:361:6: branch_false: following ‘false’ branch (when ‘a’ is non-NULL)...
cups-2.4.14/cups/array.c:368:8: branch_false: ...to here
cups-2.4.14/cups/array.c:369:6: branch_false: following ‘false’ branch (when ‘da’ is non-NULL)...
cups-2.4.14/cups/array.c:372:19: branch_false: ...to here
cups-2.4.14/cups/array.c:381:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/array.c:387:27: branch_true: ...to here
cups-2.4.14/cups/array.c:387:20: acquire_memory: allocated here
cups-2.4.14/cups/array.c:388:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/array.c:398:9: branch_false: ...to here
cups-2.4.14/cups/array.c:398:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/array.c:406:19: branch_true: following ‘true’ branch...
cups-2.4.14/cups/array.c:407:27: branch_true: ...to here
cups-2.4.14/cups/array.c:407:27: danger: ‘malloc((long unsigned int)*a.num_elements * 8)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  405|   
#  406|         for (i = 0; i < a->num_elements; i ++)
#  407|-> 	da->elements[i] = (a->copyfunc)(a->elements[i], a->data);
#  408|       }
#  409|       else

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

Error: CPPCHECK_WARNING (CWE-401): [#def82]
cups-2.4.14/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): [#def83]
cups-2.4.14/cups/array.c:1144:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*a.elements + (long unsigned int)current * 8’
cups-2.4.14/cups/array.c:616:1: enter_function: entry to ‘cupsArrayInsert’
cups-2.4.14/cups/array.c:625:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/array.c:635:10: branch_false: ...to here
cups-2.4.14/cups/array.c:635:10: call_function: calling ‘cups_array_add’ from ‘cupsArrayInsert’
# 1142|       */
# 1143|   
# 1144|->     memmove(a->elements + current + 1, a->elements + current,
# 1145|               (size_t)(a->num_elements - current) * sizeof(void *));
# 1146|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
cups-2.4.14/cups/array.c:1163:33: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/cups/array.c:785:1: enter_function: entry to ‘_cupsArrayNewStrings’
cups-2.4.14/cups/array.c:791:12: call_function: calling ‘cupsArrayNew3’ from ‘_cupsArrayNewStrings’
cups-2.4.14/cups/array.c:791:12: return_function: returning to ‘_cupsArrayNewStrings’ from ‘cupsArrayNew3’
cups-2.4.14/cups/array.c:791:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/array.c:794:5: branch_true: ...to here
cups-2.4.14/cups/array.c:794:5: call_function: calling ‘_cupsArrayAddStrings’ from ‘_cupsArrayNewStrings’
# 1161|     if (a->copyfunc)
# 1162|     {
# 1163|->     if ((a->elements[current] = (a->copyfunc)(e, a->data)) == NULL)
# 1164|       {
# 1165|         DEBUG_puts("8cups_array_add: Copy function returned NULL, returning 0");

Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
cups-2.4.14/cups/array.c:1163:33: warning[-Wanalyzer-malloc-leak]: leak of ‘cupsArrayNew3(&strcmp, 0, 0, 0, & _cupsStrAlloc, & _cupsStrFree)’
cups-2.4.14/cups/array.c:785:1: enter_function: entry to ‘_cupsArrayNewStrings’
cups-2.4.14/cups/array.c:791:12: call_function: calling ‘cupsArrayNew3’ from ‘_cupsArrayNewStrings’
cups-2.4.14/cups/array.c:791:12: return_function: returning to ‘_cupsArrayNewStrings’ from ‘cupsArrayNew3’
cups-2.4.14/cups/array.c:791:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/array.c:794:5: branch_true: ...to here
cups-2.4.14/cups/array.c:794:5: call_function: calling ‘_cupsArrayAddStrings’ from ‘_cupsArrayNewStrings’
# 1161|     if (a->copyfunc)
# 1162|     {
# 1163|->     if ((a->elements[current] = (a->copyfunc)(e, a->data)) == NULL)
# 1164|       {
# 1165|         DEBUG_puts("8cups_array_add: Copy function returned NULL, returning 0");

Error: GCC_ANALYZER_WARNING (CWE-457): [#def86]
cups-2.4.14/cups/array.c:1218:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
cups-2.4.14/cups/array.c:1013:1: enter_function: entry to ‘cups_array_add’
cups-2.4.14/cups/array.c:1028:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/array.c:1040:8: branch_true: ...to here
cups-2.4.14/cups/array.c:1040:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/array.c:1043:15: branch_true: ...to here
cups-2.4.14/cups/array.c:1057:8: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/cups/array.c:1063:5: branch_false: ...to here
cups-2.4.14/cups/array.c:1072:6: branch_false: following ‘false’ branch...
cups-2.4.14/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): [#def87]
cups-2.4.14/cups/array.c:1264:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
cups-2.4.14/cups/array.c:1013:1: enter_function: entry to ‘cups_array_add’
cups-2.4.14/cups/array.c:1028:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/array.c:1040:8: branch_true: ...to here
cups-2.4.14/cups/array.c:1040:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/array.c:1043:15: branch_true: ...to here
cups-2.4.14/cups/array.c:1057:8: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/cups/array.c:1063:5: branch_false: ...to here
cups-2.4.14/cups/array.c:1072:6: branch_false: following ‘false’ branch...
cups-2.4.14/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-401): [#def88]
cups-2.4.14/cups/dest-localization.c:214:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/cups/dest-localization.c:273:1: enter_function: entry to ‘cupsLocalizeDestValue’
cups-2.4.14/cups/dest-localization.c:288:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/dest-localization.c:291:6: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/cups/dest-localization.c:293:26: branch_true: ...to here
cups-2.4.14/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): [#def89]
cups-2.4.14/cups/dest-localization.c:214:3: warning[-Wanalyzer-malloc-leak]: leak of ‘match’
cups-2.4.14/cups/dest-localization.c:273:1: enter_function: entry to ‘cupsLocalizeDestValue’
cups-2.4.14/cups/dest-localization.c:288:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/dest-localization.c:291:6: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/cups/dest-localization.c:293:26: branch_true: ...to here
cups-2.4.14/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): [#def90]
cups-2.4.14/cups/dest-options.c:1403:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/cups/dest-options.c:1902:1: enter_function: entry to ‘cups_create_constraints’
cups-2.4.14/cups/dest-options.c:1916:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/dest-options.c:1919:10: branch_true: ...to here
cups-2.4.14/cups/dest-options.c:1919:52: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/dest-options.c:1920:7: branch_true: ...to here
cups-2.4.14/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): [#def91]
cups-2.4.14/cups/dest.c:2602:15: warning[-Wanalyzer-malloc-leak]: leak of ‘data.dests’
cups-2.4.14/cups/dest.c:3414:1: enter_function: entry to ‘cups_enum_dests’
cups-2.4.14/cups/dest.c:3472:6: branch_false: following ‘false’ branch (when ‘cb’ is non-NULL)...
cups-2.4.14/cups/dest.c:3482:3: branch_false: ...to here
cups-2.4.14/cups/dest.c:3487:20: call_function: calling ‘cups_get_dests’ from ‘cups_enum_dests’
# 2600|   
# 2601|   
# 2602|->   if ((diff = _cups_strcasecmp(a->name, b->name)) != 0)
# 2603|       return (diff);
# 2604|     else if (a->instance && b->instance)

Error: GCC_ANALYZER_WARNING (CWE-122): [#def92]
cups-2.4.14/cups/dest.c:2602:41: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
cups-2.4.14/cups/dest.c:4088:1: enter_function: entry to ‘cups_get_cb’
cups-2.4.14/cups/dest.c:4092:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/dest.c:4106:23: branch_false: ...to here
cups-2.4.14/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: GCC_ANALYZER_WARNING (CWE-401): [#def93]
cups-2.4.14/cups/dir.c:317:13: warning[-Wanalyzer-malloc-leak]: leak of ‘dp’
cups-2.4.14/cups/dir.c:302:6: branch_false: following ‘false’ branch (when ‘directory’ is non-NULL)...
cups-2.4.14/cups/dir.c:309:22: branch_false: ...to here
cups-2.4.14/cups/dir.c:309:22: acquire_memory: allocated here
cups-2.4.14/cups/dir.c:310:6: branch_false: following ‘false’ branch (when ‘dp’ is non-NULL)...
cups-2.4.14/cups/dir.c:317:13: branch_false: ...to here
cups-2.4.14/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): [#def94]
cups-2.4.14/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): [#def95]
cups-2.4.14/cups/file.c:1293:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/cups/file.c:1979:1: enter_function: entry to ‘cupsFileStdin’
cups-2.4.14/cups/file.c:1988:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/file.c:1994:31: branch_true: ...to here
cups-2.4.14/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): [#def96]
cups-2.4.14/cups/file.c:1293:26: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/cups/file.c:1979:1: enter_function: entry to ‘cupsFileStdin’
cups-2.4.14/cups/file.c:1988:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/file.c:1994:31: branch_true: ...to here
cups-2.4.14/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): [#def97]
cups-2.4.14/cups/getputfile.c:268:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 641)’
cups-2.4.14/cups/getputfile.c:221:1: enter_function: entry to ‘cupsGetFile’
cups-2.4.14/cups/getputfile.c:233:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:245:13: acquire_resource: opened here
cups-2.4.14/cups/getputfile.c:245:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:260:12: branch_false: ...to here
cups-2.4.14/cups/getputfile.c:260:12: call_function: calling ‘cupsGetFd’ from ‘cupsGetFile’
#  266|     close(fd);
#  267|   
#  268|->   if (status != HTTP_STATUS_OK)
#  269|       unlink(filename);
#  270|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def98]
cups-2.4.14/cups/getputfile.c:327:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
cups-2.4.14/cups/getputfile.c:519:1: enter_function: entry to ‘cupsPutFile’
cups-2.4.14/cups/getputfile.c:531:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:543:13: acquire_resource: opened here
cups-2.4.14/cups/getputfile.c:543:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:558:12: branch_false: ...to here
cups-2.4.14/cups/getputfile.c:558:12: call_function: calling ‘cupsPutFd’ from ‘cupsPutFile’
#  325|     do
#  326|     {
#  327|->     if (!_cups_strcasecmp(httpGetField(http, HTTP_FIELD_CONNECTION), "close"))
#  328|       {
#  329|         httpClearFields(http);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def99]
cups-2.4.14/cups/getputfile.c:329:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
cups-2.4.14/cups/getputfile.c:519:1: enter_function: entry to ‘cupsPutFile’
cups-2.4.14/cups/getputfile.c:531:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:543:13: acquire_resource: opened here
cups-2.4.14/cups/getputfile.c:543:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:558:12: branch_false: ...to here
cups-2.4.14/cups/getputfile.c:558:12: call_function: calling ‘cupsPutFd’ from ‘cupsPutFile’
#  327|       if (!_cups_strcasecmp(httpGetField(http, HTTP_FIELD_CONNECTION), "close"))
#  328|       {
#  329|->       httpClearFields(http);
#  330|         if (httpReconnect2(http, 30000, NULL))
#  331|         {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def100]
cups-2.4.14/cups/getputfile.c:330:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
cups-2.4.14/cups/getputfile.c:519:1: enter_function: entry to ‘cupsPutFile’
cups-2.4.14/cups/getputfile.c:531:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:543:13: acquire_resource: opened here
cups-2.4.14/cups/getputfile.c:543:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:558:12: branch_false: ...to here
cups-2.4.14/cups/getputfile.c:558:12: call_function: calling ‘cupsPutFd’ from ‘cupsPutFile’
#  328|       {
#  329|         httpClearFields(http);
#  330|->       if (httpReconnect2(http, 30000, NULL))
#  331|         {
#  332|   	status = HTTP_STATUS_ERROR;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def101]
cups-2.4.14/cups/getputfile.c:340:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
cups-2.4.14/cups/getputfile.c:519:1: enter_function: entry to ‘cupsPutFile’
cups-2.4.14/cups/getputfile.c:531:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:543:13: acquire_resource: opened here
cups-2.4.14/cups/getputfile.c:543:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:558:12: branch_false: ...to here
cups-2.4.14/cups/getputfile.c:558:12: call_function: calling ‘cupsPutFd’ from ‘cupsPutFile’
#  338|                     http->authstring));
#  339|   
#  340|->     httpClearFields(http);
#  341|       httpSetField(http, HTTP_FIELD_TRANSFER_ENCODING, "chunked");
#  342|       httpSetExpect(http, HTTP_STATUS_CONTINUE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def102]
cups-2.4.14/cups/getputfile.c:341:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
cups-2.4.14/cups/getputfile.c:519:1: enter_function: entry to ‘cupsPutFile’
cups-2.4.14/cups/getputfile.c:531:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:543:13: acquire_resource: opened here
cups-2.4.14/cups/getputfile.c:543:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:558:12: branch_false: ...to here
cups-2.4.14/cups/getputfile.c:558:12: call_function: calling ‘cupsPutFd’ from ‘cupsPutFile’
#  339|   
#  340|       httpClearFields(http);
#  341|->     httpSetField(http, HTTP_FIELD_TRANSFER_ENCODING, "chunked");
#  342|       httpSetExpect(http, HTTP_STATUS_CONTINUE);
#  343|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def103]
cups-2.4.14/cups/getputfile.c:342:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
cups-2.4.14/cups/getputfile.c:519:1: enter_function: entry to ‘cupsPutFile’
cups-2.4.14/cups/getputfile.c:531:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:543:13: acquire_resource: opened here
cups-2.4.14/cups/getputfile.c:543:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:558:12: branch_false: ...to here
cups-2.4.14/cups/getputfile.c:558:12: call_function: calling ‘cupsPutFd’ from ‘cupsPutFile’
#  340|       httpClearFields(http);
#  341|       httpSetField(http, HTTP_FIELD_TRANSFER_ENCODING, "chunked");
#  342|->     httpSetExpect(http, HTTP_STATUS_CONTINUE);
#  343|   
#  344|       digest = http->authstring && !strncmp(http->authstring, "Digest ", 7);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def104]
cups-2.4.14/cups/getputfile.c:352:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 0)’
cups-2.4.14/cups/getputfile.c:519:1: enter_function: entry to ‘cupsPutFile’
cups-2.4.14/cups/getputfile.c:531:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:543:13: acquire_resource: opened here
cups-2.4.14/cups/getputfile.c:543:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/getputfile.c:558:12: branch_false: ...to here
cups-2.4.14/cups/getputfile.c:558:12: call_function: calling ‘cupsPutFd’ from ‘cupsPutFile’
#  350|         */
#  351|   
#  352|->       _httpSetDigestAuthString(http, http->nextnonce, "PUT", resource);
#  353|       }
#  354|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
cups-2.4.14/cups/globals.c:354:5: warning[-Wanalyzer-malloc-leak]: leak of ‘cg’
cups-2.4.14/cups/globals.c:183:25: acquire_memory: allocated here
cups-2.4.14/cups/globals.c:195:6: branch_false: following ‘false’ branch (when ‘cg’ is non-NULL)...
cups-2.4.14/cups/globals.c:203:3: branch_false: ...to here
cups-2.4.14/cups/globals.c:349:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/globals.c:354:31: branch_true: ...to here
cups-2.4.14/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): [#def106]
cups-2.4.14/cups/http-addr.c:260:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/cups/http-addr.c:157:1: enter_function: entry to ‘httpAddrListen’
cups-2.4.14/cups/http-addr.c:169:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/http-addr.c:176:3: branch_false: ...to here
cups-2.4.14/cups/http-addr.c:182:13: acquire_resource: stream socket created here
cups-2.4.14/cups/http-addr.c:182:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/cups/http-addr.c:188:3: branch_false: ...to here
cups-2.4.14/cups/http-addr.c:228:66: call_function: calling ‘httpAddrLength’ from ‘httpAddrListen’
cups-2.4.14/cups/http-addr.c:228:66: return_function: returning to ‘httpAddrListen’ from ‘httpAddrLength’
cups-2.4.14/cups/http-addr.c:245:6: branch_false: following ‘false’ branch (when ‘status == 0’)...
cups-2.4.14/cups/http-addr.c:258:7: branch_false: ...to here
cups-2.4.14/cups/http-addr.c:258:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/http-addr.c:260:55: branch_true: ...to here
cups-2.4.14/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): [#def107]
cups-2.4.14/cups/http-addr.c:262:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/cups/http-addr.c:157:1: enter_function: entry to ‘httpAddrListen’
cups-2.4.14/cups/http-addr.c:169:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/http-addr.c:176:3: branch_false: ...to here
cups-2.4.14/cups/http-addr.c:182:13: acquire_resource: stream socket created here
cups-2.4.14/cups/http-addr.c:182:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/cups/http-addr.c:188:3: branch_false: ...to here
cups-2.4.14/cups/http-addr.c:228:66: call_function: calling ‘httpAddrLength’ from ‘httpAddrListen’
cups-2.4.14/cups/http-addr.c:228:66: return_function: returning to ‘httpAddrListen’ from ‘httpAddrLength’
cups-2.4.14/cups/http-addr.c:245:6: branch_false: following ‘false’ branch (when ‘status == 0’)...
cups-2.4.14/cups/http-addr.c:258:7: branch_false: ...to here
cups-2.4.14/cups/http-addr.c:258:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/http-addr.c:260:55: branch_true: ...to here
cups-2.4.14/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): [#def108]
cups-2.4.14/cups/http-addr.c:272:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/cups/http-addr.c:157:1: enter_function: entry to ‘httpAddrListen’
cups-2.4.14/cups/http-addr.c:169:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/http-addr.c:176:3: branch_false: ...to here
cups-2.4.14/cups/http-addr.c:182:13: acquire_resource: stream socket created here
cups-2.4.14/cups/http-addr.c:182:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/cups/http-addr.c:188:3: branch_false: ...to here
cups-2.4.14/cups/http-addr.c:228:66: call_function: calling ‘httpAddrLength’ from ‘httpAddrListen’
cups-2.4.14/cups/http-addr.c:228:66: return_function: returning to ‘httpAddrListen’ from ‘httpAddrLength’
cups-2.4.14/cups/http-addr.c:245:6: branch_false: following ‘false’ branch (when ‘status == 0’)...
cups-2.4.14/cups/http-addr.c:258:7: branch_false: ...to here
cups-2.4.14/cups/http-addr.c:258:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/http-addr.c:272:22: branch_false: ...to here
cups-2.4.14/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): [#def109]
cups-2.4.14/cups/http-addrlist.c:922:11: warning[-Wanalyzer-malloc-leak]: leak of ‘first’
cups-2.4.14/cups/http-addrlist.c:583:37: acquire_memory: allocated here
cups-2.4.14/cups/http-addrlist.c:583:8: branch_false: following ‘false’ branch (when ‘first’ is NULL)...
 branch_false: ...to here
cups-2.4.14/cups/http-addrlist.c:840:7: branch_false: following ‘false’ branch (when ‘hostname’ is non-NULL)...
cups-2.4.14/cups/http-addrlist.c:840:31: branch_false: ...to here
cups-2.4.14/cups/http-addrlist.c:840:16: branch_true: following ‘true’ branch...
cups-2.4.14/cups/http-addrlist.c:850:8: branch_true: ...to here
cups-2.4.14/cups/http-addrlist.c:850:8: branch_true: following ‘true’ branch (when ‘service’ is NULL)...
cups-2.4.14/cups/http-addrlist.c:874:8: branch_true: ...to here
cups-2.4.14/cups/http-addrlist.c:874:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/http-addrlist.c:884:10: branch_true: following ‘true’ branch (when ‘family != 2’)...
cups-2.4.14/cups/http-addrlist.c:890:35: branch_true: ...to here
cups-2.4.14/cups/http-addrlist.c:890:35: acquire_memory: allocated here
cups-2.4.14/cups/http-addrlist.c:891:12: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/cups/http-addrlist.c:898:9: branch_false: ...to here
cups-2.4.14/cups/http-addrlist.c:906:12: branch_true: following ‘true’ branch (when ‘first’ is NULL)...
 branch_true: ...to here
cups-2.4.14/cups/http-addrlist.c:912:10: branch_true: following ‘true’ branch (when ‘family != 10’)...
cups-2.4.14/cups/http-addrlist.c:919:35: branch_true: ...to here
cups-2.4.14/cups/http-addrlist.c:920:12: branch_true: following ‘true’ branch (when ‘temp’ is NULL)...
cups-2.4.14/cups/http-addrlist.c:922:61: branch_true: ...to here
cups-2.4.14/cups/http-addrlist.c:922:11: danger: ‘first’ leaks here; was allocated at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13)
#  920|   	if (!temp)
#  921|   	{
#  922|-> 	  _cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(errno), 0);
#  923|   	  httpAddrFreeList(first);
#  924|   	  return (NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
cups-2.4.14/cups/ipp.c:2664:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/cups/ipp.c:5952:1: enter_function: entry to ‘ipp_read_io’
cups-2.4.14/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.14/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.14/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.14/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.14/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.14/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6120:20: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.14/cups/ipp.c:6262:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6262:19: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.14/cups/ipp.c:6294:13: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.14/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): [#def111]
cups-2.4.14/cups/ipp.c:5486:20: warning[-Wanalyzer-malloc-leak]: leak of ‘attr’
cups-2.4.14/cups/ipp.c:5462:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:5469:6: branch_false: ...to here
cups-2.4.14/cups/ipp.c:5474:10: acquire_memory: allocated here
cups-2.4.14/cups/ipp.c:5477:6: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.14/cups/ipp.c:5485:8: branch_true: ...to here
cups-2.4.14/cups/ipp.c:5485:8: branch_true: following ‘true’ branch (when ‘name’ is non-NULL)...
cups-2.4.14/cups/ipp.c:5486:20: branch_true: ...to here
cups-2.4.14/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): [#def112]
cups-2.4.14/cups/ipp.c:6339:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘attr’
cups-2.4.14/cups/ipp.c:5965:26: release_memory: ‘attr’ is NULL
cups-2.4.14/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.14/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.14/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.14/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.14/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.14/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6120:20: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.14/cups/ipp.c:6262:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6262:19: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.14/cups/ipp.c:6294:13: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6294:13: release_memory: ‘attr’ is NULL
cups-2.4.14/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6319:20: branch_false: following ‘false’ branch (when ‘n == 4’)...
cups-2.4.14/cups/ipp.c:6331:21: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6331:20: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6337:22: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6339:25: release_memory: ‘attr’ is NULL
cups-2.4.14/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): [#def113]
cups-2.4.14/cups/ipp.c:6360:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘value’
cups-2.4.14/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.14/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.14/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.14/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.14/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.14/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6120:20: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.14/cups/ipp.c:6262:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6262:19: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.14/cups/ipp.c:6294:13: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6346:20: branch_false: following ‘false’ branch (when ‘n == 1’)...
cups-2.4.14/cups/ipp.c:6354:21: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6354:20: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6360:40: branch_false: ...to here
cups-2.4.14/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): [#def114]
cups-2.4.14/cups/ipp.c:6376:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘attr’
cups-2.4.14/cups/ipp.c:5965:26: release_memory: ‘attr’ is NULL
cups-2.4.14/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.14/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.14/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.14/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.14/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.14/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6120:20: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.14/cups/ipp.c:6262:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6262:19: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.14/cups/ipp.c:6294:13: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6294:13: release_memory: ‘attr’ is NULL
cups-2.4.14/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6376:25: release_memory: ‘attr’ is NULL
cups-2.4.14/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): [#def115]
cups-2.4.14/cups/ipp.c:6543:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘value’
cups-2.4.14/cups/ipp.c:5952:1: enter_function: entry to ‘ipp_read_io’
cups-2.4.14/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.14/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.14/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.14/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.14/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.14/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6120:20: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.14/cups/ipp.c:6262:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6262:19: branch_false: following ‘false’ branch (when ‘tag == 55’)...
cups-2.4.14/cups/ipp.c:6294:13: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6298:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6304:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6307:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6315:11: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6543:37: call_function: calling ‘ippNew’ from ‘ipp_read_io’
cups-2.4.14/cups/ipp.c:6543:37: return_function: returning to ‘ipp_read_io’ from ‘ippNew’
cups-2.4.14/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): [#def116]
cups-2.4.14/cups/ipp.c:6699:37: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.14/cups/ipp.c:6698:3: acquire_resource: ‘va_start’ called here
cups-2.4.14/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): [#def117]
cups-2.4.14/cups/ipp.c:6759:6: warning[-Wanalyzer-deref-before-check]: check of ‘temp’ for NULL after already dereferencing it
cups-2.4.14/cups/ipp.c:6734:6: branch_false: following ‘false’ branch (when ‘alloc_values <= element’)...
cups-2.4.14/cups/ipp.c:6747:6: branch_false: ...to here
cups-2.4.14/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): [#def118]
cups-2.4.14/cups/ipp.c:6808:9: warning[-Wanalyzer-malloc-leak]: leak of ‘attr’
cups-2.4.14/cups/ipp.c:5952:1: enter_function: entry to ‘ipp_read_io’
cups-2.4.14/cups/ipp.c:5974:6: branch_false: following ‘false’ branch (when ‘depth <= 10’)...
cups-2.4.14/cups/ipp.c:5980:34: branch_false: ...to here
cups-2.4.14/cups/ipp.c:5980:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:5986:11: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6035:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6047:28: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6049:14: branch_false: following ‘false’ branch (when ‘tag != 3’)...
cups-2.4.14/cups/ipp.c:6060:19: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6060:19: branch_false: following ‘false’ branch (when ‘tag != 0’)...
cups-2.4.14/cups/ipp.c:6060:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6066:19: branch_false: following ‘false’ branch (when ‘tag > 15’)...
cups-2.4.14/cups/ipp.c:6097:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6097:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6103:16: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6105:14: branch_false: following ‘false’ branch (when ‘n <= 32768’)...
cups-2.4.14/cups/ipp.c:6114:15: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6114:14: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6120:20: branch_false: ...to here
cups-2.4.14/cups/ipp.c:6120:19: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ipp.c:6126:16: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ipp.c:6133:13: branch_false: ...to here
cups-2.4.14/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-404): [#def119]
cups-2.4.14/cups/langprintf.c:123:3: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.14/cups/langprintf.c:110:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/langprintf.c:113:8: branch_false: ...to here
cups-2.4.14/cups/langprintf.c:122:3: acquire_resource: ‘va_start’ called here
cups-2.4.14/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): [#def120]
cups-2.4.14/cups/langprintf.c:180:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.14/cups/langprintf.c:166:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/langprintf.c:169:8: branch_false: ...to here
cups-2.4.14/cups/langprintf.c:178:3: acquire_resource: ‘va_start’ called here
cups-2.4.14/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): [#def121]
cups-2.4.14/cups/language.c:957:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/cups/language.c:915:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:925:13: branch_false: ...to here
cups-2.4.14/cups/language.c:925:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:932:7: branch_false: ...to here
cups-2.4.14/cups/language.c:932:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/language.c:957:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:963:11: branch_true: ...to here
cups-2.4.14/cups/language.c:979:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.14/cups/language.c:982:7: branch_false: ...to here
cups-2.4.14/cups/language.c:1001:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
cups-2.4.14/cups/language.c:1024:37: branch_false: ...to here
cups-2.4.14/cups/language.c:1024:12: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
cups-2.4.14/cups/language.c:1027:23: branch_false: ...to here
cups-2.4.14/cups/language.c:1027:23: acquire_memory: allocated here
cups-2.4.14/cups/language.c:1027:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/language.c:957:12: danger: ‘<unknown>’ leaks here; was allocated at [(16)](sarif:/runs/0/results/1/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): [#def122]
cups-2.4.14/cups/language.c:957:12: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
cups-2.4.14/cups/language.c:915:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:925:13: branch_false: ...to here
cups-2.4.14/cups/language.c:925:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:932:7: branch_false: ...to here
cups-2.4.14/cups/language.c:932:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/language.c:957:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:963:11: branch_true: ...to here
cups-2.4.14/cups/language.c:979:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.14/cups/language.c:982:7: branch_false: ...to here
cups-2.4.14/cups/language.c:1001:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
cups-2.4.14/cups/language.c:1024:37: branch_false: ...to here
cups-2.4.14/cups/language.c:1024:37: acquire_memory: allocated here
cups-2.4.14/cups/language.c:1024:12: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
cups-2.4.14/cups/language.c:1027:23: branch_false: ...to here
cups-2.4.14/cups/language.c:1027:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/language.c:957:12: danger: ‘m’ leaks here; was allocated at [(14)](sarif:/runs/0/results/0/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): [#def123]
cups-2.4.14/cups/language.c:1005:13: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
cups-2.4.14/cups/language.c:915:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:925:13: branch_false: ...to here
cups-2.4.14/cups/language.c:925:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:932:7: branch_false: ...to here
cups-2.4.14/cups/language.c:932:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/language.c:957:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:963:11: branch_true: ...to here
cups-2.4.14/cups/language.c:979:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.14/cups/language.c:982:7: branch_false: ...to here
cups-2.4.14/cups/language.c:1001:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
cups-2.4.14/cups/language.c:1024:37: branch_false: ...to here
cups-2.4.14/cups/language.c:1024:37: acquire_memory: allocated here
cups-2.4.14/cups/language.c:1024:12: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
cups-2.4.14/cups/language.c:1027:23: branch_false: ...to here
cups-2.4.14/cups/language.c:1027:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/language.c:957:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:963:11: branch_true: ...to here
cups-2.4.14/cups/language.c:963:10: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:970:18: branch_false: ...to here
cups-2.4.14/cups/language.c:970:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.14/cups/language.c:973:7: branch_false: ...to here
cups-2.4.14/cups/language.c:979:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.14/cups/language.c:982:7: branch_false: ...to here
cups-2.4.14/cups/language.c:995:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:1001:12: branch_true: ...to here
cups-2.4.14/cups/language.c:1001:12: branch_true: following ‘true’ branch (when ‘m’ is non-NULL)...
cups-2.4.14/cups/language.c:1003:15: branch_true: ...to here
cups-2.4.14/cups/language.c:1003:14: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:1003:26: branch_true: ...to here
cups-2.4.14/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): [#def124]
cups-2.4.14/cups/language.c:1102:9: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
cups-2.4.14/cups/language.c:915:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:925:13: branch_false: ...to here
cups-2.4.14/cups/language.c:925:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:932:7: branch_false: ...to here
cups-2.4.14/cups/language.c:932:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/language.c:957:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:963:11: branch_true: ...to here
cups-2.4.14/cups/language.c:979:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.14/cups/language.c:982:7: branch_false: ...to here
cups-2.4.14/cups/language.c:1001:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)...
cups-2.4.14/cups/language.c:1024:37: branch_false: ...to here
cups-2.4.14/cups/language.c:1024:37: acquire_memory: allocated here
cups-2.4.14/cups/language.c:1024:12: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
cups-2.4.14/cups/language.c:1027:23: branch_false: ...to here
cups-2.4.14/cups/language.c:1027:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/language.c:957:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:963:11: branch_true: ...to here
cups-2.4.14/cups/language.c:963:10: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:970:18: branch_false: ...to here
cups-2.4.14/cups/language.c:970:10: branch_false: following ‘false’ branch (when ‘ptr’ is non-NULL)...
cups-2.4.14/cups/language.c:973:7: branch_false: ...to here
cups-2.4.14/cups/language.c:979:10: branch_true: following ‘true’ branch (when ‘ptr’ is NULL)...
cups-2.4.14/cups/language.c:979:10: branch_true: ...to here
cups-2.4.14/cups/language.c:957:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/language.c:1098:8: branch_false: ...to here
cups-2.4.14/cups/language.c:1098:8: branch_true: following ‘true’ branch (when ‘m’ is non-NULL)...
cups-2.4.14/cups/language.c:1100:11: branch_true: ...to here
cups-2.4.14/cups/language.c:1100:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:1100:22: branch_true: ...to here
cups-2.4.14/cups/language.c:1102:9: danger: ‘m’ leaks here; was allocated at [(14)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/13)
# 1100|         if (m->str && (m->str[0] || (flags & _CUPS_MESSAGE_EMPTY)))
# 1101|         {
# 1102|-> 	cupsArrayAdd(a, m);
# 1103|         }
# 1104|         else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
cups-2.4.14/cups/language.c:1602:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/cups/language.c:1526:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/language.c:1594:8: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
cups-2.4.14/cups/language.c:1597:14: branch_false: ...to here
cups-2.4.14/cups/language.c:1597:14: acquire_memory: allocated here
cups-2.4.14/cups/language.c:1600:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:1602:7: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
# 1600|       if (m->msg && m->str)
# 1601|       {
# 1602|->       cupsArrayAdd(a, m);
# 1603|       }
# 1604|       else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
cups-2.4.14/cups/language.c:1602:7: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
cups-2.4.14/cups/language.c:1526:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/language.c:1594:14: acquire_memory: allocated here
cups-2.4.14/cups/language.c:1594:8: branch_false: following ‘false’ branch (when ‘m’ is non-NULL)...
cups-2.4.14/cups/language.c:1597:14: branch_false: ...to here
cups-2.4.14/cups/language.c:1600:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/language.c:1602:7: danger: ‘m’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
# 1600|       if (m->msg && m->str)
# 1601|       {
# 1602|->       cupsArrayAdd(a, m);
# 1603|       }
# 1604|       else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def127]
cups-2.4.14/cups/options.c:79:8: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/cups/options.c:260:1: enter_function: entry to ‘cupsParseOptions’
cups-2.4.14/cups/options.c:279:6: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
cups-2.4.14/cups/options.c:285:7: branch_false: ...to here
cups-2.4.14/cups/options.c:285:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:295:18: branch_false: ...to here
cups-2.4.14/cups/options.c:295:18: acquire_memory: allocated here
cups-2.4.14/cups/options.c:295:6: branch_false: following ‘false’ branch (when ‘copyarg’ is non-NULL)...
cups-2.4.14/cups/options.c:302:7: branch_false: ...to here
cups-2.4.14/cups/options.c:323:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/options.c:330:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/options.c:337:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:337:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:344:8: branch_false: ...to here
cups-2.4.14/cups/options.c:344:8: branch_false: following ‘false’ branch (when ‘ptr != ptr’)...
 branch_false: ...to here
cups-2.4.14/cups/options.c:351:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:354:8: branch_false: ...to here
cups-2.4.14/cups/options.c:354:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:365:12: branch_false: ...to here
cups-2.4.14/cups/options.c:365:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:366:37: branch_true: ...to here
cups-2.4.14/cups/options.c:366:23: call_function: calling ‘cupsAddOption’ from ‘cupsParseOptions’
#   77|     }
#   78|   
#   79|->   if (!_cups_strcasecmp(name, "cupsPrintQuality"))
#   80|       num_options = cupsRemoveOption("print-quality", num_options, options);
#   81|     else if (!_cups_strcasecmp(name, "print-quality"))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
cups-2.4.14/cups/options.c:81:13: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/cups/options.c:260:1: enter_function: entry to ‘cupsParseOptions’
cups-2.4.14/cups/options.c:279:6: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
cups-2.4.14/cups/options.c:285:7: branch_false: ...to here
cups-2.4.14/cups/options.c:285:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:295:18: branch_false: ...to here
cups-2.4.14/cups/options.c:295:18: acquire_memory: allocated here
cups-2.4.14/cups/options.c:295:6: branch_false: following ‘false’ branch (when ‘copyarg’ is non-NULL)...
cups-2.4.14/cups/options.c:302:7: branch_false: ...to here
cups-2.4.14/cups/options.c:323:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/options.c:330:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/options.c:337:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:337:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:344:8: branch_false: ...to here
cups-2.4.14/cups/options.c:344:8: branch_false: following ‘false’ branch (when ‘ptr != ptr’)...
 branch_false: ...to here
cups-2.4.14/cups/options.c:351:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:354:8: branch_false: ...to here
cups-2.4.14/cups/options.c:354:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:365:12: branch_false: ...to here
cups-2.4.14/cups/options.c:365:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:366:37: branch_true: ...to here
cups-2.4.14/cups/options.c:366:23: call_function: calling ‘cupsAddOption’ from ‘cupsParseOptions’
#   79|     if (!_cups_strcasecmp(name, "cupsPrintQuality"))
#   80|       num_options = cupsRemoveOption("print-quality", num_options, options);
#   81|->   else if (!_cups_strcasecmp(name, "print-quality"))
#   82|       num_options = cupsRemoveOption("cupsPrintQuality", num_options, options);
#   83|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def129]
cups-2.4.14/cups/options.c:365:12: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/cups/options.c:279:6: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
cups-2.4.14/cups/options.c:285:7: branch_false: ...to here
cups-2.4.14/cups/options.c:285:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:295:18: branch_false: ...to here
cups-2.4.14/cups/options.c:295:18: acquire_memory: allocated here
cups-2.4.14/cups/options.c:295:6: branch_false: following ‘false’ branch (when ‘copyarg’ is non-NULL)...
cups-2.4.14/cups/options.c:302:7: branch_false: ...to here
cups-2.4.14/cups/options.c:323:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/options.c:330:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/options.c:337:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:337:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:344:8: branch_false: ...to here
cups-2.4.14/cups/options.c:344:8: branch_false: following ‘false’ branch (when ‘ptr != ptr’)...
 branch_false: ...to here
cups-2.4.14/cups/options.c:351:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:354:8: branch_false: ...to here
cups-2.4.14/cups/options.c:354:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:365:12: branch_false: ...to here
cups-2.4.14/cups/options.c:365:12: danger: ‘ptr’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  363|         */
#  364|   
#  365|->       if (!_cups_strncasecmp(name, "no", 2))
#  366|           num_options = cupsAddOption(name + 2, "false", num_options,
#  367|   	                            options);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
cups-2.4.14/cups/options.c:510:10: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/cups/options.c:260:1: enter_function: entry to ‘cupsParseOptions’
cups-2.4.14/cups/options.c:279:6: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
cups-2.4.14/cups/options.c:285:7: branch_false: ...to here
cups-2.4.14/cups/options.c:285:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:295:18: branch_false: ...to here
cups-2.4.14/cups/options.c:295:18: acquire_memory: allocated here
cups-2.4.14/cups/options.c:295:6: branch_false: following ‘false’ branch (when ‘copyarg’ is non-NULL)...
cups-2.4.14/cups/options.c:302:7: branch_false: ...to here
cups-2.4.14/cups/options.c:323:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/options.c:330:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/options.c:337:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:337:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:344:8: branch_false: ...to here
cups-2.4.14/cups/options.c:344:8: branch_false: following ‘false’ branch (when ‘ptr != ptr’)...
 branch_false: ...to here
cups-2.4.14/cups/options.c:351:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:354:8: branch_false: ...to here
cups-2.4.14/cups/options.c:354:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:365:12: branch_false: ...to here
cups-2.4.14/cups/options.c:365:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:366:37: branch_true: ...to here
cups-2.4.14/cups/options.c:366:23: call_function: calling ‘cupsAddOption’ from ‘cupsParseOptions’
#  508|   
#  509|     for (i = num_options, option = *options; i > 0; i --, option ++)
#  510|->     if (!_cups_strcasecmp(name, option->name))
#  511|         break;
#  512|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def131]
cups-2.4.14/cups/options.c:524:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/cups/options.c:260:1: enter_function: entry to ‘cupsParseOptions’
cups-2.4.14/cups/options.c:279:6: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
cups-2.4.14/cups/options.c:285:7: branch_false: ...to here
cups-2.4.14/cups/options.c:285:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:295:18: branch_false: ...to here
cups-2.4.14/cups/options.c:295:18: acquire_memory: allocated here
cups-2.4.14/cups/options.c:295:6: branch_false: following ‘false’ branch (when ‘copyarg’ is non-NULL)...
cups-2.4.14/cups/options.c:302:7: branch_false: ...to here
cups-2.4.14/cups/options.c:323:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/options.c:330:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/options.c:337:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:337:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:344:8: branch_false: ...to here
cups-2.4.14/cups/options.c:344:8: branch_false: following ‘false’ branch (when ‘ptr != ptr’)...
 branch_false: ...to here
cups-2.4.14/cups/options.c:351:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:354:8: branch_false: ...to here
cups-2.4.14/cups/options.c:354:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:365:12: branch_false: ...to here
cups-2.4.14/cups/options.c:365:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:366:37: branch_true: ...to here
cups-2.4.14/cups/options.c:366:23: call_function: calling ‘cupsAddOption’ from ‘cupsParseOptions’
#  522|       i --;
#  523|   
#  524|->     _cupsStrFree(option->name);
#  525|       _cupsStrFree(option->value);
#  526|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
cups-2.4.14/cups/options.c:525:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/cups/options.c:260:1: enter_function: entry to ‘cupsParseOptions’
cups-2.4.14/cups/options.c:279:6: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
cups-2.4.14/cups/options.c:285:7: branch_false: ...to here
cups-2.4.14/cups/options.c:285:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:295:18: branch_false: ...to here
cups-2.4.14/cups/options.c:295:18: acquire_memory: allocated here
cups-2.4.14/cups/options.c:295:6: branch_false: following ‘false’ branch (when ‘copyarg’ is non-NULL)...
cups-2.4.14/cups/options.c:302:7: branch_false: ...to here
cups-2.4.14/cups/options.c:323:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/options.c:330:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/options.c:337:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:337:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:344:8: branch_false: ...to here
cups-2.4.14/cups/options.c:344:8: branch_false: following ‘false’ branch (when ‘ptr != ptr’)...
 branch_false: ...to here
cups-2.4.14/cups/options.c:351:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:354:8: branch_false: ...to here
cups-2.4.14/cups/options.c:354:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:365:12: branch_false: ...to here
cups-2.4.14/cups/options.c:365:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:366:37: branch_true: ...to here
cups-2.4.14/cups/options.c:366:23: call_function: calling ‘cupsAddOption’ from ‘cupsParseOptions’
#  523|   
#  524|       _cupsStrFree(option->name);
#  525|->     _cupsStrFree(option->value);
#  526|   
#  527|       if (i > 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
cups-2.4.14/cups/options.c:630:10: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/cups/options.c:260:1: enter_function: entry to ‘cupsParseOptions’
cups-2.4.14/cups/options.c:279:6: branch_false: following ‘false’ branch (when ‘arg’ is non-NULL)...
cups-2.4.14/cups/options.c:285:7: branch_false: ...to here
cups-2.4.14/cups/options.c:285:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:295:18: branch_false: ...to here
cups-2.4.14/cups/options.c:295:18: acquire_memory: allocated here
cups-2.4.14/cups/options.c:295:6: branch_false: following ‘false’ branch (when ‘copyarg’ is non-NULL)...
cups-2.4.14/cups/options.c:302:7: branch_false: ...to here
cups-2.4.14/cups/options.c:323:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/options.c:330:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/options.c:337:12: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:337:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:344:8: branch_false: ...to here
cups-2.4.14/cups/options.c:344:8: branch_false: following ‘false’ branch (when ‘ptr != ptr’)...
 branch_false: ...to here
cups-2.4.14/cups/options.c:351:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:354:8: branch_false: ...to here
cups-2.4.14/cups/options.c:354:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/options.c:365:12: branch_false: ...to here
cups-2.4.14/cups/options.c:365:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/options.c:366:37: branch_true: ...to here
cups-2.4.14/cups/options.c:366:23: call_function: calling ‘cupsAddOption’ from ‘cupsParseOptions’
#  628|   		     cups_option_t *b)	/* I - Second option */
#  629|   {
#  630|->   return (_cups_strcasecmp(a->name, b->name));
#  631|   }
#  632|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
cups-2.4.14/cups/ppd-cache.c:5498:22: warning[-Wanalyzer-malloc-leak]: leak of ‘f’
cups-2.4.14/cups/ppd-cache.c:5495:33: acquire_memory: allocated here
cups-2.4.14/cups/ppd-cache.c:5495:6: branch_true: following ‘true’ branch (when ‘f’ is non-NULL)...
cups-2.4.14/cups/ppd-cache.c:5497:5: branch_true: ...to here
cups-2.4.14/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): [#def135]
cups-2.4.14/cups/ppd-cache.c:5521:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/cups/ppd-cache.c:5517:6: branch_true: following ‘true’ branch (when ‘m’ is non-NULL)...
cups-2.4.14/cups/ppd-cache.c:5519:14: branch_true: ...to here
cups-2.4.14/cups/ppd-cache.c:5519:14: acquire_memory: allocated here
cups-2.4.14/cups/ppd-cache.c:5521:5: danger: ‘<unknown>’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/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): [#def136]
cups-2.4.14/cups/ppd-cache.c:5521:5: warning[-Wanalyzer-malloc-leak]: leak of ‘m’
cups-2.4.14/cups/ppd-cache.c:5517:12: acquire_memory: allocated here
cups-2.4.14/cups/ppd-cache.c:5517:6: branch_true: following ‘true’ branch (when ‘m’ is non-NULL)...
cups-2.4.14/cups/ppd-cache.c:5519:14: branch_true: ...to here
cups-2.4.14/cups/ppd-cache.c:5521:5: danger: ‘m’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/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): [#def137]
cups-2.4.14/cups/ppd-conflicts.c:687:12: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:700:1: enter_function: entry to ‘ppd_load_constraints’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_false: following ‘false’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:739:8: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/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): [#def138]
cups-2.4.14/cups/ppd-conflicts.c:687:12: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:700:1: enter_function: entry to ‘ppd_load_constraints’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_false: following ‘false’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:739:8: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/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): [#def139]
cups-2.4.14/cups/ppd-conflicts.c:779:10: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:727:8: branch_false: following ‘false’ branch (when ‘i <= 0’)...
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_false: following ‘false’ branch (when ‘i == 1’)...
cups-2.4.14/cups/ppd-conflicts.c:757:19: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/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): [#def140]
cups-2.4.14/cups/ppd-conflicts.c:779:10: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:727:8: branch_false: following ‘false’ branch (when ‘i <= 0’)...
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_false: following ‘false’ branch (when ‘i == 1’)...
cups-2.4.14/cups/ppd-conflicts.c:757:19: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/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): [#def141]
cups-2.4.14/cups/ppd-conflicts.c:780:10: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.14/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): [#def142]
cups-2.4.14/cups/ppd-conflicts.c:780:10: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.14/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): [#def143]
cups-2.4.14/cups/ppd-conflicts.c:782:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:779:9: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:782:33: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:782:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/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): [#def144]
cups-2.4.14/cups/ppd-conflicts.c:782:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:779:9: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:782:33: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:782:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/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): [#def145]
cups-2.4.14/cups/ppd-conflicts.c:783:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:779:9: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:782:33: branch_true: ...to here
cups-2.4.14/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): [#def146]
cups-2.4.14/cups/ppd-conflicts.c:783:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:779:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:780:27: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:779:9: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:782:33: branch_true: ...to here
cups-2.4.14/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): [#def147]
cups-2.4.14/cups/ppd-conflicts.c:788:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:788:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/11/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): [#def148]
cups-2.4.14/cups/ppd-conflicts.c:788:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:788:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/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): [#def149]
cups-2.4.14/cups/ppd-conflicts.c:789:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:789:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/13/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): [#def150]
cups-2.4.14/cups/ppd-conflicts.c:789:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:789:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/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): [#def151]
cups-2.4.14/cups/ppd-conflicts.c:804:10: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/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): [#def152]
cups-2.4.14/cups/ppd-conflicts.c:804:10: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/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): [#def153]
cups-2.4.14/cups/ppd-conflicts.c:805:10: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.14/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): [#def154]
cups-2.4.14/cups/ppd-conflicts.c:805:10: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.14/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): [#def155]
cups-2.4.14/cups/ppd-conflicts.c:807:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:804:9: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:807:33: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:807:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/19/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): [#def156]
cups-2.4.14/cups/ppd-conflicts.c:807:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:804:9: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:807:33: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:807:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/18/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): [#def157]
cups-2.4.14/cups/ppd-conflicts.c:808:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:804:9: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:807:33: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:808:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/21/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): [#def158]
cups-2.4.14/cups/ppd-conflicts.c:808:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:804:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:805:27: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:804:9: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-conflicts.c:807:33: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:808:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/20/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): [#def159]
cups-2.4.14/cups/ppd-conflicts.c:813:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:813:33: danger: ‘constptr’ leaks here; was allocated at [(7)](sarif:/runs/0/results/23/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): [#def160]
cups-2.4.14/cups/ppd-conflicts.c:813:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:813:33: danger: ‘consts’ leaks here; was allocated at [(5)](sarif:/runs/0/results/22/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): [#def161]
cups-2.4.14/cups/ppd-conflicts.c:814:33: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/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): [#def162]
cups-2.4.14/cups/ppd-conflicts.c:814:33: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/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): [#def163]
cups-2.4.14/cups/ppd-conflicts.c:835:5: warning[-Wanalyzer-malloc-leak]: leak of ‘constptr’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:21: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:820:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:820:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:829:27: branch_false: following ‘false’ branch...
cups-2.4.14/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): [#def164]
cups-2.4.14/cups/ppd-conflicts.c:835:5: warning[-Wanalyzer-malloc-leak]: leak of ‘consts’
cups-2.4.14/cups/ppd-conflicts.c:732:6: branch_true: following ‘true’ branch (when ‘i <= 0’)...
 branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:739:53: branch_true: following ‘true’ branch (when ‘i > 0’)...
cups-2.4.14/cups/ppd-conflicts.c:746:8: branch_true: ...to here
cups-2.4.14/cups/ppd-conflicts.c:757:19: acquire_memory: allocated here
cups-2.4.14/cups/ppd-conflicts.c:757:8: branch_false: following ‘false’ branch (when ‘consts’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:764:21: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:764:8: branch_false: following ‘false’ branch (when ‘constptr’ is non-NULL)...
cups-2.4.14/cups/ppd-conflicts.c:776:5: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:795:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:795:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:820:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-conflicts.c:820:34: branch_false: ...to here
cups-2.4.14/cups/ppd-conflicts.c:829:27: branch_false: following ‘false’ branch...
cups-2.4.14/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): [#def165]
cups-2.4.14/cups/ppd-emit.c:109:32: warning[-Wanalyzer-malloc-leak]: leak of ‘collect’
cups-2.4.14/cups/ppd-emit.c:89:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-emit.c:102:33: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:102:18: acquire_memory: allocated here
cups-2.4.14/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:109:32: danger: ‘collect’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  107|     }
#  108|   
#  109|->   if ((orders = calloc((size_t)cupsArrayCount(ppd->marked), sizeof(float))) == NULL)
#  110|     {
#  111|       *choices = NULL;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def166]
cups-2.4.14/cups/ppd-emit.c:120:28: warning[-Wanalyzer-malloc-leak]: leak of ‘collect’
cups-2.4.14/cups/ppd-emit.c:89:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-emit.c:102:33: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:102:18: acquire_memory: allocated here
cups-2.4.14/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:120:28: danger: ‘collect’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/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): [#def167]
cups-2.4.14/cups/ppd-emit.c:120:28: warning[-Wanalyzer-malloc-leak]: leak of ‘orders’
cups-2.4.14/cups/ppd-emit.c:89:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-emit.c:102:33: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:109:17: acquire_memory: allocated here
cups-2.4.14/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:120:28: danger: ‘orders’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  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): [#def168]
cups-2.4.14/cups/ppd-emit.c:122:28: warning[-Wanalyzer-malloc-leak]: leak of ‘collect’
cups-2.4.14/cups/ppd-emit.c:89:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-emit.c:102:33: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:102:18: acquire_memory: allocated here
cups-2.4.14/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:122:28: danger: ‘collect’ leaks here; was allocated at [(3)](sarif:/runs/0/results/4/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): [#def169]
cups-2.4.14/cups/ppd-emit.c:122:28: warning[-Wanalyzer-malloc-leak]: leak of ‘orders’
cups-2.4.14/cups/ppd-emit.c:89:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-emit.c:102:33: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:109:17: acquire_memory: allocated here
cups-2.4.14/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:122:28: danger: ‘orders’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  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): [#def170]
cups-2.4.14/cups/ppd-emit.c:137:19: warning[-Wanalyzer-malloc-leak]: leak of ‘collect’
cups-2.4.14/cups/ppd-emit.c:89:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-emit.c:102:33: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:102:18: acquire_memory: allocated here
cups-2.4.14/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:127:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/cups/ppd-emit.c:137:19: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:137:19: danger: ‘collect’ leaks here; was allocated at [(3)](sarif:/runs/0/results/5/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): [#def171]
cups-2.4.14/cups/ppd-emit.c:137:19: warning[-Wanalyzer-malloc-leak]: leak of ‘orders’
cups-2.4.14/cups/ppd-emit.c:89:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-emit.c:102:33: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:109:17: acquire_memory: allocated here
cups-2.4.14/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:127:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/cups/ppd-emit.c:137:19: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:137:19: danger: ‘orders’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  135|   
#  136|   
#  137|->       for (attr = ppdFindAttr(ppd, "NonUIOrderDependency", NULL);
#  138|              attr;
#  139|   	   attr = ppdFindNextAttr(ppd, "NonUIOrderDependency", NULL))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def172]
cups-2.4.14/cups/ppd-emit.c:139:19: warning[-Wanalyzer-malloc-leak]: leak of ‘collect’
cups-2.4.14/cups/ppd-emit.c:89:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-emit.c:102:33: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:102:18: acquire_memory: allocated here
cups-2.4.14/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:127:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/cups/ppd-emit.c:137:19: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:138:12: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:140:13: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:139:19: danger: ‘collect’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/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: GCC_ANALYZER_WARNING (CWE-401): [#def173]
cups-2.4.14/cups/ppd-emit.c:139:19: warning[-Wanalyzer-malloc-leak]: leak of ‘orders’
cups-2.4.14/cups/ppd-emit.c:89:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-emit.c:102:33: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:102:6: branch_false: following ‘false’ branch (when ‘collect’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:109:32: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:109:17: acquire_memory: allocated here
cups-2.4.14/cups/ppd-emit.c:109:6: branch_false: following ‘false’ branch (when ‘orders’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:120:28: branch_false: ...to here
cups-2.4.14/cups/ppd-emit.c:121:8: branch_true: following ‘true’ branch (when ‘c’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:124:16: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:127:8: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/cups/ppd-emit.c:137:19: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:138:12: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.14/cups/ppd-emit.c:140:13: branch_true: ...to here
cups-2.4.14/cups/ppd-emit.c:139:19: danger: ‘orders’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  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): [#def174]
cups-2.4.14/cups/ppd-localize.c:548:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/cups/ppd-localize.c:508:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-localize.c:515:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-localize.c:518:23: branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:518:16: acquire_memory: allocated here
cups-2.4.14/cups/ppd-localize.c:518:6: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:524:21: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/ppd-localize.c:530:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-localize.c:533:8: branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:533:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:542:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-localize.c:545:10: branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:545:8: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/cups/ppd-localize.c:548:29: branch_false: ...to here
cups-2.4.14/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): [#def175]
cups-2.4.14/cups/ppd-localize.c:548:5: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(ptr)’
cups-2.4.14/cups/ppd-localize.c:508:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-localize.c:515:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-localize.c:518:23: branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:518:6: branch_false: following ‘false’ branch (when ‘value’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:524:21: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/ppd-localize.c:530:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-localize.c:533:8: branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:533:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:542:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-localize.c:545:10: branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:545:8: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/cups/ppd-localize.c:548:29: branch_false: ...to here
cups-2.4.14/cups/ppd-localize.c:548:29: acquire_memory: allocated here
cups-2.4.14/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): [#def176]
cups-2.4.14/cups/ppd-mark.c:922:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/cups/ppd-mark.c:760:1: enter_function: entry to ‘ppd_mark_option’
cups-2.4.14/cups/ppd-mark.c:803:7: call_function: calling ‘ppdFindOption’ from ‘ppd_mark_option’
cups-2.4.14/cups/ppd-mark.c:803:7: return_function: returning to ‘ppd_mark_option’ from ‘ppdFindOption’
cups-2.4.14/cups/ppd-mark.c:807:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-mark.c:810:9: branch_false: ...to here
cups-2.4.14/cups/ppd-mark.c:812:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-mark.c:899:12: branch_false: ...to here
cups-2.4.14/cups/ppd-mark.c:899:11: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-mark.c:913:14: branch_true: ...to here
cups-2.4.14/cups/ppd-mark.c:913:14: call_function: calling ‘ppdFindChoice’ from ‘ppd_mark_option’
cups-2.4.14/cups/ppd-mark.c:913:14: return_function: returning to ‘ppd_mark_option’ from ‘ppdFindChoice’
cups-2.4.14/cups/ppd-mark.c:913:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-mark.c:916:20: branch_false: ...to here
cups-2.4.14/cups/ppd-mark.c:916:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-mark.c:918:18: branch_true: ...to here
cups-2.4.14/cups/ppd-mark.c:920:31: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-mark.c:922:51: branch_true: ...to here
cups-2.4.14/cups/ppd-mark.c:922:12: branch_false: following ‘false’ branch...
cups-2.4.14/cups/ppd-mark.c:925:17: branch_false: ...to here
cups-2.4.14/cups/ppd-mark.c:967:47: acquire_memory: allocated here
cups-2.4.14/cups/ppd-mark.c:920:31: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd-mark.c:922:51: branch_true: ...to here
cups-2.4.14/cups/ppd-mark.c:922:12: danger: ‘<unknown>’ leaks here; was allocated at [(32)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/31)
#  920|         for (i = 0, val = vals; i < num_vals; i ++, val ++)
#  921|         {
#  922|->         if ((cparam = ppdFindCustomParam(coption, val->name)) == NULL)
#  923|   	  continue;
#  924|   

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def178]
cups-2.4.14/cups/ppd.c:368:31: warning[-Wanalyzer-malloc-leak]: leak of ‘_ppdGlobals()’
cups-2.4.14/cups/ppd.c:2216:1: enter_function: entry to ‘ppdOpenFd’
cups-2.4.14/cups/ppd.c:2220:31: call_function: calling ‘_ppdGlobals’ from ‘ppdOpenFd’
cups-2.4.14/cups/ppd.c:2220:31: return_function: returning to ‘ppdOpenFd’ from ‘_ppdGlobals’
cups-2.4.14/cups/ppd.c:2234:6: branch_true: following ‘true’ branch (when ‘fd < 0’)...
cups-2.4.14/cups/ppd.c:2236:5: branch_true: ...to here
cups-2.4.14/cups/ppd.c:368:31: danger: ‘_ppdGlobals()’ leaks here; was allocated at [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
#  366|     */
#  367|   
#  368|->   if ((pg = (_ppd_globals_t *)_cupsThreadGetData(ppd_globals_key)) == NULL)
#  369|     {
#  370|      /*

Error: GCC_ANALYZER_WARNING (CWE-476): [#def179]
cups-2.4.14/cups/ppd.c:528:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cups-2.4.14/cups/ppd.c:2266:1: enter_function: entry to ‘_ppdOpenFile’
cups-2.4.14/cups/ppd.c:2285:6: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/cups/ppd.c:2296:13: branch_false: ...to here
cups-2.4.14/cups/ppd.c:2296:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd.c:2298:11: branch_true: ...to here
cups-2.4.14/cups/ppd.c:2298:11: call_function: calling ‘_ppdOpen’ from ‘_ppdOpenFile’
#  526|     */
#  527|   
#  528|->   pg->ppd_status = PPD_OK;
#  529|     pg->ppd_line   = 0;
#  530|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def180]
cups-2.4.14/cups/ppd.c:547:17: warning[-Wanalyzer-malloc-leak]: leak of ‘_ppdGlobals()’
cups-2.4.14/cups/ppd.c:2266:1: enter_function: entry to ‘_ppdOpenFile’
cups-2.4.14/cups/ppd.c:2285:6: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/cups/ppd.c:2296:13: branch_false: ...to here
cups-2.4.14/cups/ppd.c:2296:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd.c:2298:11: branch_true: ...to here
cups-2.4.14/cups/ppd.c:2298:11: call_function: calling ‘_ppdOpen’ from ‘_ppdOpenFile’
#  545|     if (localization == _PPD_LOCALIZATION_DEFAULT)
#  546|     {
#  547|->     if ((lang = cupsLangDefault()) == NULL)
#  548|         return (NULL);
#  549|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def181]
cups-2.4.14/cups/ppd.c:2228:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cups-2.4.14/cups/ppd.c:2216:1: enter_function: entry to ‘ppdOpenFd’
cups-2.4.14/cups/ppd.c:2220:31: call_function: calling ‘_ppdGlobals’ from ‘ppdOpenFd’
cups-2.4.14/cups/ppd.c:2220:31: return_function: returning to ‘ppdOpenFd’ from ‘_ppdGlobals’
cups-2.4.14/cups/ppd.c:2228:3: danger: dereference of NULL ‘_ppdGlobals()’
# 2226|     */
# 2227|   
# 2228|->   pg->ppd_line = 0;
# 2229|   
# 2230|    /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def182]
cups-2.4.14/cups/ppd.c:2245:13: warning[-Wanalyzer-malloc-leak]: leak of ‘_ppdGlobals()’
cups-2.4.14/cups/ppd.c:2216:1: enter_function: entry to ‘ppdOpenFd’
cups-2.4.14/cups/ppd.c:2220:31: call_function: calling ‘_ppdGlobals’ from ‘ppdOpenFd’
cups-2.4.14/cups/ppd.c:2220:31: return_function: returning to ‘ppdOpenFd’ from ‘_ppdGlobals’
cups-2.4.14/cups/ppd.c:2234:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/cups/ppd.c:2245:13: branch_false: ...to here
cups-2.4.14/cups/ppd.c:2245:13: danger: ‘_ppdGlobals()’ leaks here; was allocated at [(9)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/8)
# 2243|     */
# 2244|   
# 2245|->   if ((fp = cupsFileOpenFd(fd, "r")) != NULL)
# 2246|     {
# 2247|       ppd = ppdOpen2(fp);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def183]
cups-2.4.14/cups/ppd.c:2279:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cups-2.4.14/cups/ppd.c:2266:1: enter_function: entry to ‘_ppdOpenFile’
cups-2.4.14/cups/ppd.c:2271:31: call_function: calling ‘_ppdGlobals’ from ‘_ppdOpenFile’
cups-2.4.14/cups/ppd.c:2271:31: return_function: returning to ‘_ppdOpenFile’ from ‘_ppdGlobals’
cups-2.4.14/cups/ppd.c:2279:3: danger: dereference of NULL ‘_ppdGlobals()’
# 2277|     */
# 2278|   
# 2279|->   pg->ppd_line = 0;
# 2280|   
# 2281|    /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def184]
cups-2.4.14/cups/ppd.c:2296:13: warning[-Wanalyzer-malloc-leak]: leak of ‘_ppdGlobals()’
cups-2.4.14/cups/ppd.c:2266:1: enter_function: entry to ‘_ppdOpenFile’
cups-2.4.14/cups/ppd.c:2271:31: call_function: calling ‘_ppdGlobals’ from ‘_ppdOpenFile’
cups-2.4.14/cups/ppd.c:2271:31: return_function: returning to ‘_ppdOpenFile’ from ‘_ppdGlobals’
cups-2.4.14/cups/ppd.c:2285:6: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/cups/ppd.c:2296:13: branch_false: ...to here
cups-2.4.14/cups/ppd.c:2296:13: danger: ‘_ppdGlobals()’ leaks here; was allocated at [(9)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/8)
# 2294|     */
# 2295|   
# 2296|->   if ((fp = cupsFileOpen(filename, "r")) != NULL)
# 2297|     {
# 2298|       ppd = _ppdOpen(fp, localization);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def185]
cups-2.4.14/cups/ppd.c:2336:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cups-2.4.14/cups/ppd.c:2330:1: enter_function: entry to ‘ppdSetConformance’
cups-2.4.14/cups/ppd.c:2332:31: call_function: calling ‘_ppdGlobals’ from ‘ppdSetConformance’
cups-2.4.14/cups/ppd.c:2332:31: return_function: returning to ‘ppdSetConformance’ from ‘_ppdGlobals’
cups-2.4.14/cups/ppd.c:2336:3: danger: dereference of NULL ‘_ppdGlobals()’
# 2334|   
# 2335|   
# 2336|->   pg->ppd_conform = c;
# 2337|   }
# 2338|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def186]
cups-2.4.14/cups/ppd.c:2337:1: warning[-Wanalyzer-malloc-leak]: leak of ‘_ppdGlobals()’
cups-2.4.14/cups/ppd.c:2330:1: enter_function: entry to ‘ppdSetConformance’
cups-2.4.14/cups/ppd.c:2332:31: call_function: calling ‘_ppdGlobals’ from ‘ppdSetConformance’
cups-2.4.14/cups/ppd.c:2332:31: return_function: returning to ‘ppdSetConformance’ from ‘_ppdGlobals’
cups-2.4.14/cups/ppd.c:2337:1: danger: ‘_ppdGlobals()’ leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8)
# 2335|   
# 2336|     pg->ppd_conform = c;
# 2337|-> }
# 2338|   
# 2339|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def187]
cups-2.4.14/cups/ppd.c:2970:18: warning[-Wanalyzer-malloc-leak]: leak of ‘line.buffer’
cups-2.4.14/cups/ppd.c:2266:1: enter_function: entry to ‘_ppdOpenFile’
cups-2.4.14/cups/ppd.c:2285:6: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/cups/ppd.c:2296:13: branch_false: ...to here
cups-2.4.14/cups/ppd.c:2296:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd.c:2298:11: branch_true: ...to here
cups-2.4.14/cups/ppd.c:2298:11: call_function: calling ‘_ppdOpen’ from ‘_ppdOpenFile’
# 2968|       colon    = 0;
# 2969|   
# 2970|->     while ((ch = cupsFileGetChar(fp)) != EOF)
# 2971|       {
# 2972|         if (lineptr >= (line->buffer + line->bufsize - 1))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def188]
cups-2.4.14/cups/ppd.c:3143:20: warning[-Wanalyzer-malloc-leak]: leak of ‘line.buffer’
cups-2.4.14/cups/ppd.c:2266:1: enter_function: entry to ‘_ppdOpenFile’
cups-2.4.14/cups/ppd.c:2285:6: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/cups/ppd.c:2296:13: branch_false: ...to here
cups-2.4.14/cups/ppd.c:2296:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd.c:2298:11: branch_true: ...to here
cups-2.4.14/cups/ppd.c:2298:11: call_function: calling ‘_ppdOpen’ from ‘_ppdOpenFile’
# 3141|         */
# 3142|   
# 3143|->       while ((ch = cupsFileGetChar(fp)) != EOF)
# 3144|   	if (ch == '\r' || ch == '\n')
# 3145|   	{

Error: GCC_ANALYZER_WARNING (CWE-127): [#def189]
cups-2.4.14/cups/ppd.c:3196:35: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read
cups-2.4.14/cups/ppd.c:2266:1: enter_function: entry to ‘_ppdOpenFile’
cups-2.4.14/cups/ppd.c:2285:6: branch_false: following ‘false’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/cups/ppd.c:2296:13: branch_false: ...to here
cups-2.4.14/cups/ppd.c:2296:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/ppd.c:2298:11: branch_true: ...to here
cups-2.4.14/cups/ppd.c:2298:11: call_function: calling ‘_ppdOpen’ from ‘_ppdOpenFile’
# 3194|       }
# 3195|   
# 3196|->     if (lineptr > line->buffer && lineptr[-1] == '\n')
# 3197|         lineptr --;
# 3198|   

Error: CPPCHECK_WARNING (CWE-457): [#def190]
cups-2.4.14/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): [#def191]
cups-2.4.14/cups/raster-interpret.c:532:5: warning[-Wanalyzer-malloc-leak]: leak of ‘codecopy’
cups-2.4.14/cups/raster-interpret.c:505:1: enter_function: entry to ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:524:19: acquire_memory: allocated here
cups-2.4.14/cups/raster-interpret.c:524:6: branch_false: following ‘false’ branch (when ‘codecopy’ is non-NULL)...
cups-2.4.14/cups/raster-interpret.c:530:13: branch_false: ...to here
cups-2.4.14/cups/raster-interpret.c:530:13: call_function: calling ‘new_stack’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:530:13: return_function: returning to ‘_cupsRasterExecPS’ from ‘new_stack’
cups-2.4.14/cups/raster-interpret.c:530:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-interpret.c:532:5: branch_true: ...to here
cups-2.4.14/cups/raster-interpret.c:532:5: danger: ‘codecopy’ leaks here; was allocated at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
#  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): [#def192]
cups-2.4.14/cups/raster-interpret.c:560:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/cups/raster-interpret.c:505:1: enter_function: entry to ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:524:6: branch_false: following ‘false’ branch (when ‘codecopy’ is non-NULL)...
cups-2.4.14/cups/raster-interpret.c:530:13: branch_false: ...to here
cups-2.4.14/cups/raster-interpret.c:530:13: call_function: calling ‘new_stack’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:530:13: return_function: returning to ‘_cupsRasterExecPS’ from ‘new_stack’
cups-2.4.14/cups/raster-interpret.c:530:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-interpret.c:541:3: branch_false: ...to here
cups-2.4.14/cups/raster-interpret.c:543:17: call_function: calling ‘scan_ps’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:543:17: return_function: returning to ‘_cupsRasterExecPS’ from ‘scan_ps’
cups-2.4.14/cups/raster-interpret.c:543:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-interpret.c:550:13: branch_true: ...to here
cups-2.4.14/cups/raster-interpret.c:557:11: call_function: inlined call to ‘pop_stack’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:559:15: call_function: calling ‘cleartomark_stack’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:559:15: return_function: returning to ‘_cupsRasterExecPS’ from ‘cleartomark_stack’
cups-2.4.14/cups/raster-interpret.c:559:14: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-interpret.c:560:13: branch_true: ...to here
cups-2.4.14/cups/raster-interpret.c:560:13: danger: ‘<unknown>’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7)
#  558|   
#  559|   	  if (cleartomark_stack(st))
#  560|-> 	    _cupsRasterAddError("cleartomark: Stack underflow.\n");
#  561|   
#  562|   #ifdef DEBUG

Error: GCC_ANALYZER_WARNING (CWE-401): [#def193]
cups-2.4.14/cups/raster-interpret.c:560:13: warning[-Wanalyzer-malloc-leak]: leak of ‘new_stack()’
cups-2.4.14/cups/raster-interpret.c:505:1: enter_function: entry to ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:524:6: branch_false: following ‘false’ branch (when ‘codecopy’ is non-NULL)...
cups-2.4.14/cups/raster-interpret.c:530:13: branch_false: ...to here
cups-2.4.14/cups/raster-interpret.c:530:13: call_function: calling ‘new_stack’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:530:13: return_function: returning to ‘_cupsRasterExecPS’ from ‘new_stack’
cups-2.4.14/cups/raster-interpret.c:530:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-interpret.c:541:3: branch_false: ...to here
cups-2.4.14/cups/raster-interpret.c:543:17: call_function: calling ‘scan_ps’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:543:17: return_function: returning to ‘_cupsRasterExecPS’ from ‘scan_ps’
cups-2.4.14/cups/raster-interpret.c:543:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-interpret.c:550:13: branch_true: ...to here
cups-2.4.14/cups/raster-interpret.c:557:11: call_function: inlined call to ‘pop_stack’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:559:15: call_function: calling ‘cleartomark_stack’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:559:15: return_function: returning to ‘_cupsRasterExecPS’ from ‘cleartomark_stack’
cups-2.4.14/cups/raster-interpret.c:559:14: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-interpret.c:560:13: branch_true: ...to here
cups-2.4.14/cups/raster-interpret.c:560:13: danger: ‘new_stack()’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  558|   
#  559|   	  if (cleartomark_stack(st))
#  560|-> 	    _cupsRasterAddError("cleartomark: Stack underflow.\n");
#  561|   
#  562|   #ifdef DEBUG

Error: GCC_ANALYZER_WARNING (CWE-401): [#def194]
cups-2.4.14/cups/raster-interpret.c:1329:30: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/cups/raster-interpret.c:505:1: enter_function: entry to ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:524:6: branch_false: following ‘false’ branch (when ‘codecopy’ is non-NULL)...
cups-2.4.14/cups/raster-interpret.c:530:13: branch_false: ...to here
cups-2.4.14/cups/raster-interpret.c:530:13: call_function: calling ‘new_stack’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:530:13: return_function: returning to ‘_cupsRasterExecPS’ from ‘new_stack’
cups-2.4.14/cups/raster-interpret.c:530:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-interpret.c:541:3: branch_false: ...to here
cups-2.4.14/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): [#def195]
cups-2.4.14/cups/raster-interpret.c:1329:30: warning[-Wanalyzer-malloc-leak]: leak of ‘codeptr’
cups-2.4.14/cups/raster-interpret.c:505:1: enter_function: entry to ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:524:19: acquire_memory: allocated here
cups-2.4.14/cups/raster-interpret.c:524:6: branch_false: following ‘false’ branch (when ‘codecopy’ is non-NULL)...
cups-2.4.14/cups/raster-interpret.c:530:13: branch_false: ...to here
cups-2.4.14/cups/raster-interpret.c:530:13: call_function: calling ‘new_stack’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:530:13: return_function: returning to ‘_cupsRasterExecPS’ from ‘new_stack’
cups-2.4.14/cups/raster-interpret.c:530:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-interpret.c:541:3: branch_false: ...to here
cups-2.4.14/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): [#def196]
cups-2.4.14/cups/raster-interpret.c:1329:30: warning[-Wanalyzer-malloc-leak]: leak of ‘new_stack()’
cups-2.4.14/cups/raster-interpret.c:505:1: enter_function: entry to ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:524:6: branch_false: following ‘false’ branch (when ‘codecopy’ is non-NULL)...
cups-2.4.14/cups/raster-interpret.c:530:13: branch_false: ...to here
cups-2.4.14/cups/raster-interpret.c:530:13: call_function: calling ‘new_stack’ from ‘_cupsRasterExecPS’
cups-2.4.14/cups/raster-interpret.c:530:13: return_function: returning to ‘_cupsRasterExecPS’ from ‘new_stack’
cups-2.4.14/cups/raster-interpret.c:530:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-interpret.c:541:3: branch_false: ...to here
cups-2.4.14/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): [#def197]
cups-2.4.14/cups/raster-stream.c:1515:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*r_62(D)->bufptr’
cups-2.4.14/cups/raster-stream.c:1415:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1422:25: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1423:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1426:23: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1426:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-stream.c:1428:22: branch_true: ...to here
cups-2.4.14/cups/raster-stream.c:1433:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1436:14: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1438:8: branch_false: following ‘false’ branch (when ‘rptr’ is non-NULL)...
cups-2.4.14/cups/raster-stream.c:1441:5: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1452:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-stream.c:1455:5: branch_true: ...to here
cups-2.4.14/cups/raster-stream.c:1459:8: branch_false: following ‘false’ branch (when ‘remaining != 0’)...
cups-2.4.14/cups/raster-stream.c:1506:8: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1509:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-stream.c:1515:15: branch_true: ...to here
cups-2.4.14/cups/raster-stream.c:1515:14: danger: use of uninitialized value ‘*r_62(D)->bufptr’ here
# 1513|         */
# 1514|   
# 1515|->       *buf = *(r->bufptr)++;
# 1516|         remaining --;
# 1517|       }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def198]
cups-2.4.14/cups/raster-stream.c:1531:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*bufptr’
cups-2.4.14/cups/raster-stream.c:1415:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1422:25: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1423:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1426:23: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1426:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-stream.c:1428:22: branch_true: ...to here
cups-2.4.14/cups/raster-stream.c:1433:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1436:14: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1438:8: branch_false: following ‘false’ branch (when ‘rptr’ is non-NULL)...
cups-2.4.14/cups/raster-stream.c:1441:5: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1452:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-stream.c:1455:5: branch_true: ...to here
cups-2.4.14/cups/raster-stream.c:1459:8: branch_false: following ‘false’ branch (when ‘remaining != 0’)...
cups-2.4.14/cups/raster-stream.c:1506:8: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1509:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1518:13: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1518:13: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-stream.c:1528:7: branch_true: ...to here
cups-2.4.14/cups/raster-stream.c:1530:32: branch_true: following ‘true’ branch (when ‘count > 0’)...
cups-2.4.14/cups/raster-stream.c:1531:19: branch_true: ...to here
cups-2.4.14/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): [#def199]
cups-2.4.14/cups/raster-stream.c:1541:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*r.bufptr’
cups-2.4.14/cups/raster-stream.c:1415:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1422:25: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1423:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1426:23: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1426:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-stream.c:1428:22: branch_true: ...to here
cups-2.4.14/cups/raster-stream.c:1433:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1436:14: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1438:8: branch_false: following ‘false’ branch (when ‘rptr’ is non-NULL)...
cups-2.4.14/cups/raster-stream.c:1441:5: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1452:8: branch_true: following ‘true’ branch...
cups-2.4.14/cups/raster-stream.c:1455:5: branch_true: ...to here
cups-2.4.14/cups/raster-stream.c:1459:8: branch_false: following ‘false’ branch (when ‘remaining != 0’)...
cups-2.4.14/cups/raster-stream.c:1506:8: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1509:8: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1518:13: branch_false: ...to here
cups-2.4.14/cups/raster-stream.c:1518:13: branch_false: following ‘false’ branch...
cups-2.4.14/cups/raster-stream.c:1541:7: branch_false: ...to here
cups-2.4.14/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): [#def200]
cups-2.4.14/cups/string.c:131:3: warning[-Wanalyzer-malloc-leak]: leak of ‘item’
cups-2.4.14/cups/string.c:56:6: branch_false: following ‘false’ branch (when ‘s’ is non-NULL)...
cups-2.4.14/cups/string.c:63:3: branch_false: ...to here
cups-2.4.14/cups/string.c:68:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/string.c:79:3: branch_false: ...to here
cups-2.4.14/cups/string.c:81:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/string.c:107:10: branch_false: ...to here
cups-2.4.14/cups/string.c:108:29: acquire_memory: allocated here
cups-2.4.14/cups/string.c:109:6: branch_false: following ‘false’ branch (when ‘item’ is non-NULL)...
cups-2.4.14/cups/string.c:116:3: branch_false: ...to here
cups-2.4.14/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): [#def201]
cups-2.4.14/cups/tls-gnutls.c:811:7: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cups-2.4.14/cups/tls-gnutls.c:728:6: branch_false: following ‘false’ branch...
cups-2.4.14/cups/tls-gnutls.c:731:6: branch_false: ...to here
cups-2.4.14/cups/tls-gnutls.c:738:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/cups/tls-gnutls.c:741:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/tls-gnutls.c:743:10: branch_true: ...to here
cups-2.4.14/cups/tls-gnutls.c:745:10: branch_false: following ‘false’ branch (when ‘in_certificate == 0’)...
 branch_false: ...to here
cups-2.4.14/cups/tls-gnutls.c:741:10: branch_true: following ‘true’ branch...
cups-2.4.14/cups/tls-gnutls.c:743:10: branch_true: ...to here
cups-2.4.14/cups/tls-gnutls.c:758:13: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/cups/tls-gnutls.c:784:13: branch_false: ...to here
cups-2.4.14/cups/tls-gnutls.c:786:10: branch_true: following ‘true’ branch (when ‘alloc_data == 0’)...
cups-2.4.14/cups/tls-gnutls.c:788:22: branch_true: ...to here
cups-2.4.14/cups/tls-gnutls.c:788:22: acquire_memory: allocated here
cups-2.4.14/cups/tls-gnutls.c:791:12: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
cups-2.4.14/cups/tls-gnutls.c:810:17: branch_false: ...to here
cups-2.4.14/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): [#def202]
cups-2.4.14/cups/tls-gnutls.c:1055:11: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
cups-2.4.14/cups/tls-gnutls.c:981:1: enter_function: entry to ‘http_gnutls_load_crl’
cups-2.4.14/cups/tls-gnutls.c:985:6: branch_true: following ‘true’ branch...
cups-2.4.14/cups/tls-gnutls.c:997:5: branch_true: ...to here
cups-2.4.14/cups/tls-gnutls.c:997:5: call_function: calling ‘http_gnutls_make_path’ from ‘http_gnutls_load_crl’
cups-2.4.14/cups/tls-gnutls.c:997:5: return_function: returning to ‘http_gnutls_load_crl’ from ‘http_gnutls_make_path’
cups-2.4.14/cups/tls-gnutls.c:999:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/cups/tls-gnutls.c:1001:14: branch_true: following ‘true’ branch...
cups-2.4.14/cups/tls-gnutls.c:1003:14: branch_true: ...to here
cups-2.4.14/cups/tls-gnutls.c:1014:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/cups/tls-gnutls.c:1034:14: branch_false: ...to here
cups-2.4.14/cups/tls-gnutls.c:1034:14: branch_true: following ‘true’ branch (when ‘alloc_data == 0’)...
cups-2.4.14/cups/tls-gnutls.c:1036:26: branch_true: ...to here
cups-2.4.14/cups/tls-gnutls.c:1036:26: acquire_memory: allocated here
cups-2.4.14/cups/tls-gnutls.c:1039:16: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
cups-2.4.14/cups/tls-gnutls.c:1054:21: branch_false: ...to here
cups-2.4.14/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): [#def203]
cups-2.4.14/cups/tls-gnutls.c:1320:3: warning[-Wanalyzer-malloc-leak]: leak of ‘credentials’
cups-2.4.14/cups/tls-gnutls.c:1308:21: acquire_memory: allocated here
cups-2.4.14/cups/tls-gnutls.c:1309:6: branch_false: following ‘false’ branch (when ‘credentials’ is non-NULL)...
cups-2.4.14/cups/tls-gnutls.c:1320:3: branch_false: ...to here
cups-2.4.14/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: [#def204]
cups-2.4.14/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: [#def205]
cups-2.4.14/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: [#def206]
cups-2.4.14/filter/common.c:353:23: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
cups-2.4.14/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/common.c:351:19: branch_true: ...to here
cups-2.4.14/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): [#def207]
cups-2.4.14/filter/common.c:365:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.14/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/common.c:351:19: branch_true: ...to here
cups-2.4.14/filter/common.c:353:23: acquire_memory: this call could return NULL
cups-2.4.14/filter/common.c:355:14: branch_true: following ‘true’ branch...
cups-2.4.14/filter/common.c:357:13: branch_true: ...to here
cups-2.4.14/filter/common.c:357:12: branch_false: following ‘false’ branch...
cups-2.4.14/filter/common.c:359:32: branch_false: ...to here
cups-2.4.14/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): [#def208]
cups-2.4.14/filter/common.c:375:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.14/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/common.c:351:19: branch_true: ...to here
cups-2.4.14/filter/common.c:353:23: acquire_memory: this call could return NULL
cups-2.4.14/filter/common.c:355:14: branch_true: following ‘true’ branch...
cups-2.4.14/filter/common.c:357:13: branch_true: ...to here
cups-2.4.14/filter/common.c:357:12: branch_false: following ‘false’ branch...
cups-2.4.14/filter/common.c:359:32: branch_false: ...to here
cups-2.4.14/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): [#def209]
cups-2.4.14/filter/common.c:380:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.14/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/common.c:351:19: branch_true: ...to here
cups-2.4.14/filter/common.c:353:23: acquire_memory: this call could return NULL
cups-2.4.14/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): [#def210]
cups-2.4.14/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): [#def211]
cups-2.4.14/filter/common.c:386:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.14/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/common.c:349:8: branch_false: following ‘false’ branch (when ‘max_width >= label_len’)...
cups-2.4.14/filter/common.c:385:23: branch_false: ...to here
cups-2.4.14/filter/common.c:385:23: acquire_memory: this call could return NULL
cups-2.4.14/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): [#def212]
cups-2.4.14/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-457): [#def213]
cups-2.4.14/filter/common.c:392:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
cups-2.4.14/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/common.c:351:19: branch_true: ...to here
cups-2.4.14/filter/common.c:389:17: branch_true: following ‘true’ branch (when ‘n < lines’)...
cups-2.4.14/filter/common.c:391:7: branch_true: ...to here
cups-2.4.14/filter/common.c:402:10: branch_false: following ‘false’ branch (when ‘i <= longest’)...
cups-2.4.14/filter/common.c:407:7: branch_false: ...to here
cups-2.4.14/filter/common.c:389:17: branch_true: following ‘true’ branch (when ‘n < lines’)...
cups-2.4.14/filter/common.c:391:7: branch_true: ...to here
cups-2.4.14/filter/common.c:392:12: danger: use of uninitialized value ‘*<unknown>’ here
#  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): [#def214]
cups-2.4.14/filter/common.c:392:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’
cups-2.4.14/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/common.c:351:19: branch_true: ...to here
cups-2.4.14/filter/common.c:380:26: acquire_memory: this call could return NULL
cups-2.4.14/filter/common.c:389:17: branch_true: following ‘true’ branch (when ‘n < lines’)...
cups-2.4.14/filter/common.c:391:7: branch_true: ...to here
cups-2.4.14/filter/common.c:392:43: danger: ‘ptr’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/8/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): [#def215]
cups-2.4.14/filter/common.c:452:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/filter/common.c:338:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/common.c:349:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/common.c:351:19: branch_true: ...to here
cups-2.4.14/filter/common.c:380:26: acquire_memory: allocated here
cups-2.4.14/filter/common.c:389:17: branch_false: following ‘false’ branch (when ‘n >= lines’)...
cups-2.4.14/filter/common.c:414:5: branch_false: ...to here
cups-2.4.14/filter/common.c:425:17: branch_false: following ‘false’ branch (when ‘n >= lines’)...
cups-2.4.14/filter/common.c:428:5: branch_false: ...to here
cups-2.4.14/filter/common.c:439:17: branch_false: following ‘false’ branch (when ‘n >= lines’)...
cups-2.4.14/filter/common.c:446:5: branch_false: ...to here
cups-2.4.14/filter/common.c:452:5: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/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: [#def216]
cups-2.4.14/filter/pstops.c:3224:23: warning[-Wanalyzer-imprecise-fp-arithmetic]: use of floating-point arithmetic here might yield unexpected results
cups-2.4.14/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3224:23: danger: operand ‘width’ is of type ‘float’
# 3222|         lines = 1 + (int)(label_len / max_width);
# 3223|         line_len = (int)(label_len / lines);
# 3224|->       wrapped_label = malloc(sizeof(*wrapped_label) * lines);
# 3225|         label_index = i = n = 0;
# 3226|         while (classification[label_index])

Error: GCC_ANALYZER_WARNING (CWE-476): [#def217]
cups-2.4.14/filter/pstops.c:3236:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.14/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3224:23: acquire_memory: this call could return NULL
cups-2.4.14/filter/pstops.c:3226:14: branch_true: following ‘true’ branch...
cups-2.4.14/filter/pstops.c:3228:13: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3228:12: branch_false: following ‘false’ branch...
cups-2.4.14/filter/pstops.c:3230:32: branch_false: ...to here
cups-2.4.14/filter/pstops.c:3236:13: 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)
# 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): [#def218]
cups-2.4.14/filter/pstops.c:3246:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.14/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3224:23: acquire_memory: this call could return NULL
cups-2.4.14/filter/pstops.c:3226:14: branch_true: following ‘true’ branch...
cups-2.4.14/filter/pstops.c:3228:13: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3228:12: branch_false: following ‘false’ branch...
cups-2.4.14/filter/pstops.c:3230:32: branch_false: ...to here
cups-2.4.14/filter/pstops.c:3246:11: 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)
# 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): [#def219]
cups-2.4.14/filter/pstops.c:3251:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.14/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3224:23: acquire_memory: this call could return NULL
cups-2.4.14/filter/pstops.c:3251:7: 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)
# 3249|           }
# 3250|         }
# 3251|->       wrapped_label[n] = strndup(&classification[label_index], label_len - label_index);
# 3252|       }
# 3253|       else

Error: CPPCHECK_WARNING (CWE-476): [#def220]
cups-2.4.14/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): [#def221]
cups-2.4.14/filter/pstops.c:3257:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘wrapped_label’
cups-2.4.14/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/pstops.c:3220:8: branch_false: following ‘false’ branch (when ‘max_width >= label_len’)...
cups-2.4.14/filter/pstops.c:3256:23: branch_false: ...to here
cups-2.4.14/filter/pstops.c:3256:23: acquire_memory: this call could return NULL
cups-2.4.14/filter/pstops.c:3257:7: danger: ‘wrapped_label’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/4/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): [#def222]
cups-2.4.14/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-457): [#def223]
cups-2.4.14/filter/pstops.c:3263:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
cups-2.4.14/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3260:17: branch_true: following ‘true’ branch (when ‘n < lines’)...
cups-2.4.14/filter/pstops.c:3262:7: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3273:10: branch_false: following ‘false’ branch (when ‘i <= longest’)...
cups-2.4.14/filter/pstops.c:3278:7: branch_false: ...to here
cups-2.4.14/filter/pstops.c:3260:17: branch_true: following ‘true’ branch (when ‘n < lines’)...
cups-2.4.14/filter/pstops.c:3262:7: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3263:12: danger: use of uninitialized value ‘*<unknown>’ here
# 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): [#def224]
cups-2.4.14/filter/pstops.c:3263:43: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘ptr’
cups-2.4.14/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3251:26: acquire_memory: this call could return NULL
cups-2.4.14/filter/pstops.c:3260:17: branch_true: following ‘true’ branch (when ‘n < lines’)...
cups-2.4.14/filter/pstops.c:3262:7: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3263:43: danger: ‘ptr’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/6/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): [#def225]
cups-2.4.14/filter/pstops.c:3319:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/filter/pstops.c:3209:6: branch_true: following ‘true’ branch...
cups-2.4.14/filter/pstops.c:3220:8: branch_true: following ‘true’ branch (when ‘max_width < label_len’)...
cups-2.4.14/filter/pstops.c:3222:19: branch_true: ...to here
cups-2.4.14/filter/pstops.c:3251:26: acquire_memory: allocated here
cups-2.4.14/filter/pstops.c:3260:17: branch_false: following ‘false’ branch (when ‘n >= lines’)...
cups-2.4.14/filter/pstops.c:3285:5: branch_false: ...to here
cups-2.4.14/filter/pstops.c:3295:17: branch_false: following ‘false’ branch (when ‘n >= lines’)...
cups-2.4.14/filter/pstops.c:3297:5: branch_false: ...to here
cups-2.4.14/filter/pstops.c:3307:17: branch_false: following ‘false’ branch (when ‘n >= lines’)...
cups-2.4.14/filter/pstops.c:3313:5: branch_false: ...to here
cups-2.4.14/filter/pstops.c:3319:5: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/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): [#def226]
cups-2.4.14/filter/rastertoepson.c:1020:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/filter/rastertoepson.c:991:6: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertoepson.c:1008:6: branch_false: ...to here
cups-2.4.14/filter/rastertoepson.c:1008:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.14/filter/rastertoepson.c:1010:15: branch_true: ...to here
cups-2.4.14/filter/rastertoepson.c:1010:15: acquire_resource: opened here
cups-2.4.14/filter/rastertoepson.c:1010:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertoepson.c:1020:9: branch_false: ...to here
cups-2.4.14/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): [#def227]
cups-2.4.14/filter/rastertohp.c:690:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/filter/rastertohp.c:661:6: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertohp.c:678:6: branch_false: ...to here
cups-2.4.14/filter/rastertohp.c:678:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.14/filter/rastertohp.c:680:15: branch_true: ...to here
cups-2.4.14/filter/rastertohp.c:680:15: acquire_resource: opened here
cups-2.4.14/filter/rastertohp.c:680:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertohp.c:690:9: branch_false: ...to here
cups-2.4.14/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): [#def228]
cups-2.4.14/filter/rastertolabel.c:1143:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/filter/rastertolabel.c:1114:6: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertolabel.c:1131:6: branch_false: ...to here
cups-2.4.14/filter/rastertolabel.c:1131:6: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.14/filter/rastertolabel.c:1133:15: branch_true: ...to here
cups-2.4.14/filter/rastertolabel.c:1133:15: acquire_resource: opened here
cups-2.4.14/filter/rastertolabel.c:1133:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertolabel.c:1143:9: branch_false: ...to here
cups-2.4.14/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): [#def229]
cups-2.4.14/filter/rastertopwg.c:75:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:61:11: branch_true: following ‘true’ branch (when ‘argc == 7’)...
cups-2.4.14/filter/rastertopwg.c:63:15: branch_true: ...to here
cups-2.4.14/filter/rastertopwg.c:63:15: acquire_resource: opened here
cups-2.4.14/filter/rastertopwg.c:63:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:72:29: branch_false: ...to here
cups-2.4.14/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): [#def230]
cups-2.4.14/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-401): [#def231]
cups-2.4.14/filter/rastertopwg.c:452:12: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
cups-2.4.14/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:86:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:88:10: branch_true: following ‘true’ branch...
cups-2.4.14/filter/rastertopwg.c:94:45: branch_true: ...to here
cups-2.4.14/filter/rastertopwg.c:145:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:152:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:160:9: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:236:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:249:16: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:431:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:442:20: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:448:12: acquire_memory: allocated here
cups-2.4.14/filter/rastertopwg.c:451:24: branch_true: following ‘true’ branch (when ‘y != 0’)...
cups-2.4.14/filter/rastertopwg.c:452:12: branch_true: ...to here
cups-2.4.14/filter/rastertopwg.c:452:12: danger: ‘line’ leaks here; was allocated at [(15)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/14)
#  450|       memset(line, white, linesize);
#  451|       for (y = page_top; y > 0; y --)
#  452|->       if (!cupsRasterWritePixels(outras, line, outheader.cupsBytesPerLine))
#  453|         {
#  454|   	_cupsLangPrintFilter(stderr, "ERROR", _("Error sending raster data."));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def232]
cups-2.4.14/filter/rastertopwg.c:462:11: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
cups-2.4.14/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:86:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:88:10: branch_true: following ‘true’ branch...
cups-2.4.14/filter/rastertopwg.c:94:45: branch_true: ...to here
cups-2.4.14/filter/rastertopwg.c:145:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:152:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:160:9: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:236:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:249:16: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:431:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:442:20: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:448:12: acquire_memory: allocated here
cups-2.4.14/filter/rastertopwg.c:451:24: branch_false: following ‘false’ branch (when ‘y == 0’)...
cups-2.4.14/filter/rastertopwg.c:460:10: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:460:35: branch_true: following ‘true’ branch (when ‘y != 0’)...
cups-2.4.14/filter/rastertopwg.c:462:11: branch_true: ...to here
cups-2.4.14/filter/rastertopwg.c:462:11: danger: ‘line’ leaks here; was allocated at [(15)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/14)
#  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): [#def233]
cups-2.4.14/filter/rastertopwg.c:470:12: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
cups-2.4.14/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:86:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:88:10: branch_true: following ‘true’ branch...
cups-2.4.14/filter/rastertopwg.c:94:45: branch_true: ...to here
cups-2.4.14/filter/rastertopwg.c:145:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:152:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:160:9: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:236:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:249:16: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:431:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:442:20: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:448:12: acquire_memory: allocated here
cups-2.4.14/filter/rastertopwg.c:451:24: branch_false: following ‘false’ branch (when ‘y == 0’)...
cups-2.4.14/filter/rastertopwg.c:460:10: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:460:35: branch_true: following ‘true’ branch (when ‘y != 0’)...
cups-2.4.14/filter/rastertopwg.c:462:11: branch_true: ...to here
cups-2.4.14/filter/rastertopwg.c:462:10: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:470:12: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:470:12: danger: ‘line’ leaks here; was allocated at [(15)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/14)
#  468|         }
#  469|   
#  470|->       if (!cupsRasterWritePixels(outras, line, outheader.cupsBytesPerLine))
#  471|         {
#  472|   	_cupsLangPrintFilter(stderr, "ERROR", _("Error sending raster data."));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def234]
cups-2.4.14/filter/rastertopwg.c:481:12: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
cups-2.4.14/filter/rastertopwg.c:56:6: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:61:11: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:86:11: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:88:10: branch_true: following ‘true’ branch...
cups-2.4.14/filter/rastertopwg.c:94:45: branch_true: ...to here
cups-2.4.14/filter/rastertopwg.c:145:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:152:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:160:9: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:236:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:249:16: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:431:8: branch_false: following ‘false’ branch...
cups-2.4.14/filter/rastertopwg.c:442:20: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:448:12: acquire_memory: allocated here
cups-2.4.14/filter/rastertopwg.c:451:24: branch_false: following ‘false’ branch (when ‘y == 0’)...
cups-2.4.14/filter/rastertopwg.c:460:10: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:460:35: branch_false: following ‘false’ branch (when ‘y == 0’)...
cups-2.4.14/filter/rastertopwg.c:479:5: branch_false: ...to here
cups-2.4.14/filter/rastertopwg.c:480:27: branch_true: following ‘true’ branch (when ‘y != 0’)...
cups-2.4.14/filter/rastertopwg.c:481:12: branch_true: ...to here
cups-2.4.14/filter/rastertopwg.c:481:12: danger: ‘line’ leaks here; was allocated at [(15)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/14)
#  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): [#def235]
cups-2.4.14/locale/checkpo.c:383:5: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
cups-2.4.14/locale/checkpo.c:359:10: branch_true: following ‘true’ branch (when ‘id’ is non-NULL)...
cups-2.4.14/locale/checkpo.c:361:9: branch_true: ...to here
cups-2.4.14/locale/checkpo.c:361:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/locale/checkpo.c:383:24: acquire_memory: allocated here
cups-2.4.14/locale/checkpo.c:383:5: danger: ‘strdup(&buf)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5)
#  381|   
#  382|       *bufptr = '\0';
#  383|->     cupsArrayAdd(fmts, strdup(buf));
#  384|     }
#  385|   

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

Error: GCC_ANALYZER_WARNING (CWE-775): [#def238]
cups-2.4.14/monitor/bcp.c:75:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:62:14: acquire_resource: opened here
cups-2.4.14/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.14/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): [#def239]
cups-2.4.14/monitor/bcp.c:75:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:62:14: acquire_memory: allocated here
cups-2.4.14/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.14/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): [#def240]
cups-2.4.14/monitor/bcp.c:189:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/monitor/bcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.14/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:62:14: acquire_resource: opened here
cups-2.4.14/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:81:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.14/monitor/bcp.c:83:5: branch_true: ...to here
cups-2.4.14/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): [#def241]
cups-2.4.14/monitor/bcp.c:189:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/monitor/bcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.14/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:62:14: acquire_memory: allocated here
cups-2.4.14/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:81:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.14/monitor/bcp.c:83:5: branch_true: ...to here
cups-2.4.14/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): [#def242]
cups-2.4.14/monitor/bcp.c:211:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/monitor/bcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.14/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:62:14: acquire_resource: opened here
cups-2.4.14/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:81:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.14/monitor/bcp.c:83:5: branch_true: ...to here
cups-2.4.14/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): [#def243]
cups-2.4.14/monitor/bcp.c:211:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/monitor/bcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.14/monitor/bcp.c:46:6: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:54:6: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:54:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/monitor/bcp.c:61:14: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:62:14: acquire_memory: allocated here
cups-2.4.14/monitor/bcp.c:64:8: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/bcp.c:75:21: branch_false: ...to here
cups-2.4.14/monitor/bcp.c:81:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.14/monitor/bcp.c:83:5: branch_true: ...to here
cups-2.4.14/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): [#def244]
cups-2.4.14/monitor/tbcp.c:178:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/monitor/tbcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.14/monitor/tbcp.c:45:6: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/tbcp.c:53:6: branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:53:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/monitor/tbcp.c:60:14: branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:61:14: acquire_resource: opened here
cups-2.4.14/monitor/tbcp.c:63:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:74:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.14/monitor/tbcp.c:76:5: branch_true: ...to here
cups-2.4.14/monitor/tbcp.c:83:10: call_function: calling ‘psgets’ from ‘main’
#  176|         if (ch != EOF && ch != '\n')
#  177|         {
#  178|->         ungetc(ch, fp);	/* Nope, save it for later... */
#  179|           ch = '\r';
#  180|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def245]
cups-2.4.14/monitor/tbcp.c:178:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/monitor/tbcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.14/monitor/tbcp.c:45:6: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/tbcp.c:53:6: branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:53:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/monitor/tbcp.c:60:14: branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:61:14: acquire_memory: allocated here
cups-2.4.14/monitor/tbcp.c:63:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:74:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.14/monitor/tbcp.c:76:5: branch_true: ...to here
cups-2.4.14/monitor/tbcp.c:83:10: call_function: calling ‘psgets’ from ‘main’
#  176|         if (ch != EOF && ch != '\n')
#  177|         {
#  178|->         ungetc(ch, fp);	/* Nope, save it for later... */
#  179|           ch = '\r';
#  180|         }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def246]
cups-2.4.14/monitor/tbcp.c:200:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/monitor/tbcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.14/monitor/tbcp.c:45:6: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/tbcp.c:53:6: branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:53:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/monitor/tbcp.c:60:14: branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:61:14: acquire_resource: opened here
cups-2.4.14/monitor/tbcp.c:63:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:74:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.14/monitor/tbcp.c:76:5: branch_true: ...to here
cups-2.4.14/monitor/tbcp.c:83:10: call_function: calling ‘psgets’ from ‘main’
#  198|         *bufptr++ = (char)ch;
#  199|       else
#  200|->       ungetc(ch, fp);
#  201|     }
#  202|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def247]
cups-2.4.14/monitor/tbcp.c:200:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/monitor/tbcp.c:32:1: enter_function: entry to ‘main’
cups-2.4.14/monitor/tbcp.c:45:6: branch_false: following ‘false’ branch...
cups-2.4.14/monitor/tbcp.c:53:6: branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:53:6: branch_false: following ‘false’ branch (when ‘argc != 6’)...
cups-2.4.14/monitor/tbcp.c:60:14: branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:61:14: acquire_memory: allocated here
cups-2.4.14/monitor/tbcp.c:63:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/monitor/tbcp.c:74:10: branch_true: following ‘true’ branch (when ‘copies > 0’)...
cups-2.4.14/monitor/tbcp.c:76:5: branch_true: ...to here
cups-2.4.14/monitor/tbcp.c:83:10: call_function: calling ‘psgets’ from ‘main’
#  198|         *bufptr++ = (char)ch;
#  199|       else
#  200|->       ungetc(ch, fp);
#  201|     }
#  202|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def248]
cups-2.4.14/notifier/mailto.c:553:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.14/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): [#def249]
cups-2.4.14/notifier/mailto.c:553:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.14/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): [#def250]
cups-2.4.14/notifier/mailto.c:556:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.14/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): [#def251]
cups-2.4.14/notifier/mailto.c:556:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.14/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): [#def252]
cups-2.4.14/notifier/mailto.c:559:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.14/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): [#def253]
cups-2.4.14/notifier/mailto.c:559:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.14/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): [#def254]
cups-2.4.14/notifier/mailto.c:560:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/notifier/mailto.c:553:5: branch_true: ...to here
cups-2.4.14/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): [#def255]
cups-2.4.14/notifier/mailto.c:571:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:565:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.14/notifier/mailto.c:571:5: branch_true: ...to here
cups-2.4.14/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): [#def256]
cups-2.4.14/notifier/mailto.c:571:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:565:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.14/notifier/mailto.c:571:5: branch_true: ...to here
cups-2.4.14/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): [#def257]
cups-2.4.14/notifier/mailto.c:573:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:565:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.14/notifier/mailto.c:571:5: branch_true: ...to here
cups-2.4.14/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): [#def258]
cups-2.4.14/notifier/mailto.c:573:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:565:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.14/notifier/mailto.c:571:5: branch_true: ...to here
cups-2.4.14/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): [#def259]
cups-2.4.14/notifier/mailto.c:574:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:565:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.14/notifier/mailto.c:571:5: branch_true: ...to here
cups-2.4.14/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): [#def260]
cups-2.4.14/notifier/mailto.c:584:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[0]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:565:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/notifier/mailto.c:584:3: branch_false: ...to here
cups-2.4.14/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): [#def261]
cups-2.4.14/notifier/mailto.c:584:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:565:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/notifier/mailto.c:584:3: branch_false: ...to here
cups-2.4.14/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): [#def262]
cups-2.4.14/notifier/mailto.c:586:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipefds[1]’
cups-2.4.14/notifier/mailto.c:507:37: branch_false: following ‘false’ branch (when ‘lineptr’ is NULL)...
cups-2.4.14/notifier/mailto.c:529:8: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:536:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/mailto.c:546:14: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:546:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/notifier/mailto.c:565:11: branch_false: ...to here
cups-2.4.14/notifier/mailto.c:565:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/notifier/mailto.c:584:3: branch_false: ...to here
cups-2.4.14/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): [#def263]
cups-2.4.14/notifier/rss.c:535:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "r")’
cups-2.4.14/notifier/rss.c:450:13: acquire_resource: opened here
cups-2.4.14/notifier/rss.c:450:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.14/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.14/notifier/rss.c:468:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.14/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.14/notifier/rss.c:468:8: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:470:14: branch_false: ...to here
cups-2.4.14/notifier/rss.c:470:13: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:500:13: branch_false: ...to here
cups-2.4.14/notifier/rss.c:502:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.14/notifier/rss.c:511:23: branch_false: ...to here
cups-2.4.14/notifier/rss.c:511:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.14/notifier/rss.c:520:23: branch_false: ...to here
cups-2.4.14/notifier/rss.c:520:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.14/notifier/rss.c:529:23: branch_false: ...to here
cups-2.4.14/notifier/rss.c:529:13: branch_true: following ‘true’ branch (when ‘start’ is non-NULL)...
cups-2.4.14/notifier/rss.c:531:7: branch_true: ...to here
cups-2.4.14/notifier/rss.c:532:10: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
cups-2.4.14/notifier/rss.c:534:9: branch_true: ...to here
cups-2.4.14/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): [#def264]
cups-2.4.14/notifier/rss.c:535:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "r")’
cups-2.4.14/notifier/rss.c:450:13: acquire_memory: allocated here
cups-2.4.14/notifier/rss.c:450:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.14/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.14/notifier/rss.c:468:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/notifier/rss.c:466:10: branch_true: following ‘true’ branch...
cups-2.4.14/notifier/rss.c:468:9: branch_true: ...to here
cups-2.4.14/notifier/rss.c:468:8: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:470:14: branch_false: ...to here
cups-2.4.14/notifier/rss.c:470:13: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:500:13: branch_false: ...to here
cups-2.4.14/notifier/rss.c:502:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.14/notifier/rss.c:511:23: branch_false: ...to here
cups-2.4.14/notifier/rss.c:511:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.14/notifier/rss.c:520:23: branch_false: ...to here
cups-2.4.14/notifier/rss.c:520:13: branch_false: following ‘false’ branch (when ‘start’ is NULL)...
cups-2.4.14/notifier/rss.c:529:23: branch_false: ...to here
cups-2.4.14/notifier/rss.c:529:13: branch_true: following ‘true’ branch (when ‘start’ is non-NULL)...
cups-2.4.14/notifier/rss.c:531:7: branch_true: ...to here
cups-2.4.14/notifier/rss.c:532:10: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
cups-2.4.14/notifier/rss.c:534:9: branch_true: ...to here
cups-2.4.14/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): [#def265]
cups-2.4.14/notifier/rss.c:642:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "w")’
cups-2.4.14/notifier/rss.c:620:13: acquire_resource: opened here
cups-2.4.14/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.14/notifier/rss.c:642:3: danger: ‘fopen(filename, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  640|     fputs("    <ttl>1</ttl>\n", fp);
#  641|   
#  642|->   fprintf(fp, "    <pubDate>%s</pubDate>\n",
#  643|             httpGetDateString2(time(NULL), date, sizeof(date)));
#  644|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
cups-2.4.14/notifier/rss.c:642:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "w")’
cups-2.4.14/notifier/rss.c:620:13: acquire_memory: allocated here
cups-2.4.14/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.14/notifier/rss.c:642:3: danger: ‘fopen(filename, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
#  640|     fputs("    <ttl>1</ttl>\n", fp);
#  641|   
#  642|->   fprintf(fp, "    <pubDate>%s</pubDate>\n",
#  643|             httpGetDateString2(time(NULL), date, sizeof(date)));
#  644|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def267]
cups-2.4.14/notifier/rss.c:645:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "w")’
cups-2.4.14/notifier/rss.c:620:13: acquire_resource: opened here
cups-2.4.14/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.14/notifier/rss.c:645:29: danger: ‘fopen(filename, "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
#  643|             httpGetDateString2(time(NULL), date, sizeof(date)));
#  644|   
#  645|->   for (msg = (_cups_rss_t *)cupsArrayLast(rss);
#  646|          msg;
#  647|          msg = (_cups_rss_t *)cupsArrayPrev(rss))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def268]
cups-2.4.14/notifier/rss.c:645:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "w")’
cups-2.4.14/notifier/rss.c:620:13: acquire_memory: allocated here
cups-2.4.14/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.14/notifier/rss.c:645:29: danger: ‘fopen(filename, "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
#  643|             httpGetDateString2(time(NULL), date, sizeof(date)));
#  644|   
#  645|->   for (msg = (_cups_rss_t *)cupsArrayLast(rss);
#  646|          msg;
#  647|          msg = (_cups_rss_t *)cupsArrayPrev(rss))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def269]
cups-2.4.14/notifier/rss.c:647:29: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "w")’
cups-2.4.14/notifier/rss.c:610:1: enter_function: entry to ‘save_rss’
cups-2.4.14/notifier/rss.c:620:13: acquire_resource: opened here
cups-2.4.14/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.14/notifier/rss.c:646:8: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
cups-2.4.14/notifier/rss.c:649:32: branch_true: ...to here
cups-2.4.14/notifier/rss.c:649:21: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:649:21: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:647:29: danger: ‘fopen(filename, "w")’ leaks here; was opened at [(2)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/1)
#  645|     for (msg = (_cups_rss_t *)cupsArrayLast(rss);
#  646|          msg;
#  647|->        msg = (_cups_rss_t *)cupsArrayPrev(rss))
#  648|     {
#  649|       char *subject = xml_escape(msg->subject);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def270]
cups-2.4.14/notifier/rss.c:647:29: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "w")’
cups-2.4.14/notifier/rss.c:610:1: enter_function: entry to ‘save_rss’
cups-2.4.14/notifier/rss.c:620:13: acquire_memory: allocated here
cups-2.4.14/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.14/notifier/rss.c:646:8: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
cups-2.4.14/notifier/rss.c:649:32: branch_true: ...to here
cups-2.4.14/notifier/rss.c:649:21: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:649:21: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:647:29: danger: ‘fopen(filename, "w")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/1)
#  645|     for (msg = (_cups_rss_t *)cupsArrayLast(rss);
#  646|          msg;
#  647|->        msg = (_cups_rss_t *)cupsArrayPrev(rss))
#  648|     {
#  649|       char *subject = xml_escape(msg->subject);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def271]
cups-2.4.14/notifier/rss.c:657:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "w")’
cups-2.4.14/notifier/rss.c:610:1: enter_function: entry to ‘save_rss’
cups-2.4.14/notifier/rss.c:620:13: acquire_resource: opened here
cups-2.4.14/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.14/notifier/rss.c:646:8: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
cups-2.4.14/notifier/rss.c:649:32: branch_true: ...to here
cups-2.4.14/notifier/rss.c:649:21: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:649:21: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:650:18: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:650:18: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:657:5: danger: ‘fopen(filename, "w")’ leaks here; was opened at [(2)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/1)
#  655|       if (msg->link_url)
#  656|         fprintf(fp, "      <link>%s</link>\n", msg->link_url);
#  657|->     fprintf(fp, "      <pubDate>%s</pubDate>\n",
#  658|               httpGetDateString2(msg->event_time, date, sizeof(date)));
#  659|       fprintf(fp, "      <guid>%d</guid>\n", msg->sequence_number);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def272]
cups-2.4.14/notifier/rss.c:657:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "w")’
cups-2.4.14/notifier/rss.c:610:1: enter_function: entry to ‘save_rss’
cups-2.4.14/notifier/rss.c:620:13: acquire_memory: allocated here
cups-2.4.14/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.14/notifier/rss.c:646:8: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
cups-2.4.14/notifier/rss.c:649:32: branch_true: ...to here
cups-2.4.14/notifier/rss.c:649:21: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:649:21: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:650:18: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:650:18: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:657:5: danger: ‘fopen(filename, "w")’ leaks here; was allocated at [(2)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/1)
#  655|       if (msg->link_url)
#  656|         fprintf(fp, "      <link>%s</link>\n", msg->link_url);
#  657|->     fprintf(fp, "      <pubDate>%s</pubDate>\n",
#  658|               httpGetDateString2(msg->event_time, date, sizeof(date)));
#  659|       fprintf(fp, "      <guid>%d</guid>\n", msg->sequence_number);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
cups-2.4.14/notifier/rss.c:657:5: warning[-Wanalyzer-malloc-leak]: leak of ‘xml_escape(*msg.subject)’
cups-2.4.14/notifier/rss.c:610:1: enter_function: entry to ‘save_rss’
cups-2.4.14/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.14/notifier/rss.c:634:10: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:634:10: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:646:8: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
cups-2.4.14/notifier/rss.c:649:32: branch_true: ...to here
cups-2.4.14/notifier/rss.c:649:21: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:649:21: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:650:18: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:650:18: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:657:5: danger: ‘xml_escape(*msg.subject)’ leaks here; was allocated at [(14)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/13)
#  655|       if (msg->link_url)
#  656|         fprintf(fp, "      <link>%s</link>\n", msg->link_url);
#  657|->     fprintf(fp, "      <pubDate>%s</pubDate>\n",
#  658|               httpGetDateString2(msg->event_time, date, sizeof(date)));
#  659|       fprintf(fp, "      <guid>%d</guid>\n", msg->sequence_number);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
cups-2.4.14/notifier/rss.c:657:5: warning[-Wanalyzer-malloc-leak]: leak of ‘xml_escape(*msg.text)’
cups-2.4.14/notifier/rss.c:610:1: enter_function: entry to ‘save_rss’
cups-2.4.14/notifier/rss.c:620:6: branch_false: following ‘false’ branch...
cups-2.4.14/notifier/rss.c:627:3: branch_false: ...to here
cups-2.4.14/notifier/rss.c:634:10: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:634:10: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:646:8: branch_true: following ‘true’ branch (when ‘msg’ is non-NULL)...
cups-2.4.14/notifier/rss.c:649:32: branch_true: ...to here
cups-2.4.14/notifier/rss.c:649:21: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:649:21: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:650:18: call_function: calling ‘xml_escape’ from ‘save_rss’
cups-2.4.14/notifier/rss.c:650:18: return_function: returning to ‘save_rss’ from ‘xml_escape’
cups-2.4.14/notifier/rss.c:657:5: danger: ‘xml_escape(*msg.text)’ leaks here; was allocated at [(22)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/21)
#  655|       if (msg->link_url)
#  656|         fprintf(fp, "      <link>%s</link>\n", msg->link_url);
#  657|->     fprintf(fp, "      <pubDate>%s</pubDate>\n",
#  658|               httpGetDateString2(msg->event_time, date, sizeof(date)));
#  659|       fprintf(fp, "      <guid>%d</guid>\n", msg->sequence_number);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def275]
cups-2.4.14/scheduler/auth.c:1314:22: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1314:22: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1314:22: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1312|   
# 1313|     if (loc->location)
# 1314|->     temp->location = _cupsStrAlloc(loc->location);
# 1315|   
# 1316|     temp->length     = loc->length;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def276]
cups-2.4.14/scheduler/auth.c:1326:24: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1316:22: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1324:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1326:24: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1326:24: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 1324|     if (loc->names)
# 1325|     {
# 1326|->     if ((temp->names = cupsArrayDup(loc->names)) == NULL)
# 1327|       {
# 1328|         cupsdLogMessage(CUPSD_LOG_ERROR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def277]
cups-2.4.14/scheduler/auth.c:1328:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1316:22: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1324:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1326:24: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1326:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1330:60: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1328:7: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 1326|       if ((temp->names = cupsArrayDup(loc->names)) == NULL)
# 1327|       {
# 1328|->       cupsdLogMessage(CUPSD_LOG_ERROR,
# 1329|                         "Unable to allocate memory for %d names: %s",
# 1330|   		      cupsArrayCount(loc->names), strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def278]
cups-2.4.14/scheduler/auth.c:1343:24: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1316:22: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1324:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1337:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1337:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1343:24: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1343:24: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 1341|       */
# 1342|   
# 1343|->     if ((temp->allow = cupsArrayDup(loc->allow)) == NULL)
# 1344|       {
# 1345|         cupsdLogMessage(CUPSD_LOG_ERROR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def279]
cups-2.4.14/scheduler/auth.c:1345:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1316:22: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1324:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1337:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1337:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1343:24: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1343:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1347:60: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1345:7: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1343|       if ((temp->allow = cupsArrayDup(loc->allow)) == NULL)
# 1344|       {
# 1345|->       cupsdLogMessage(CUPSD_LOG_ERROR,
# 1346|                         "Unable to allocate memory for %d allow rules: %s",
# 1347|                         cupsArrayCount(loc->allow), strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def280]
cups-2.4.14/scheduler/auth.c:1359:23: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1316:22: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1324:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1337:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1337:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1353:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1353:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1359:23: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1359:23: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 1357|       */
# 1358|   
# 1359|->     if ((temp->deny = cupsArrayDup(loc->deny)) == NULL)
# 1360|       {
# 1361|         cupsdLogMessage(CUPSD_LOG_ERROR,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def281]
cups-2.4.14/scheduler/auth.c:1361:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1316:22: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1324:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1337:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1337:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1353:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1353:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1359:23: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1359:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1363:59: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1361:7: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
# 1359|       if ((temp->deny = cupsArrayDup(loc->deny)) == NULL)
# 1360|       {
# 1361|->       cupsdLogMessage(CUPSD_LOG_ERROR,
# 1362|                         "Unable to allocate memory for %d deny rules: %s",
# 1363|                         cupsArrayCount(loc->deny), strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def282]
cups-2.4.14/scheduler/auth.c:1534:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1293:1: enter_function: entry to ‘cupsdCopyLocation’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1316:22: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1324:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1326:24: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1326:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1330:60: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1332:7: call_function: calling ‘cupsdFreeLocation’ from ‘cupsdCopyLocation’
# 1532|   cupsdFreeLocation(cupsd_location_t *loc)/* I - Location to free */
# 1533|   {
# 1534|->   cupsArrayDelete(loc->names);
# 1535|     cupsArrayDelete(loc->allow);
# 1536|     cupsArrayDelete(loc->deny);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def283]
cups-2.4.14/scheduler/auth.c:1535:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1293:1: enter_function: entry to ‘cupsdCopyLocation’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1316:22: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1324:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1326:24: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1326:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1330:60: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1332:7: call_function: calling ‘cupsdFreeLocation’ from ‘cupsdCopyLocation’
# 1533|   {
# 1534|     cupsArrayDelete(loc->names);
# 1535|->   cupsArrayDelete(loc->allow);
# 1536|     cupsArrayDelete(loc->deny);
# 1537|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
cups-2.4.14/scheduler/auth.c:1536:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1293:1: enter_function: entry to ‘cupsdCopyLocation’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1316:22: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1324:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1326:24: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1326:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1330:60: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1332:7: call_function: calling ‘cupsdFreeLocation’ from ‘cupsdCopyLocation’
# 1534|     cupsArrayDelete(loc->names);
# 1535|     cupsArrayDelete(loc->allow);
# 1536|->   cupsArrayDelete(loc->deny);
# 1537|   
# 1538|     _cupsStrFree(loc->location);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def285]
cups-2.4.14/scheduler/auth.c:1538:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1293:1: enter_function: entry to ‘cupsdCopyLocation’
cups-2.4.14/scheduler/auth.c:1303:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1303:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1310:6: branch_false: following ‘false’ branch (when ‘loc’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1313:7: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1313:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/auth.c:1316:22: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1324:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1326:24: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1326:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:1330:60: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:1332:7: call_function: calling ‘cupsdFreeLocation’ from ‘cupsdCopyLocation’
# 1536|     cupsArrayDelete(loc->deny);
# 1537|   
# 1538|->   _cupsStrFree(loc->location);
# 1539|     free(loc);
# 1540|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def286]
cups-2.4.14/scheduler/auth.c:1939:25: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:1932:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:1932:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:1939:25: branch_false: ...to here
cups-2.4.14/scheduler/auth.c:1939:25: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/0)
# 1937|     */
# 1938|   
# 1939|->   if ((temp->location = _cupsStrAlloc(location)) == NULL)
# 1940|     {
# 1941|       free(temp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def287]
cups-2.4.14/scheduler/auth.c:2253:35: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/auth.c:2243:15: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:2243:6: branch_true: following ‘true’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/auth.c:2245:5: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:2247:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/auth.c:2253:49: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:2253:35: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/0)
# 2251|         */
# 2252|   
# 2253|->       if ((temp->mask.name.name = _cupsStrAlloc(temp->mask.name.name)) == NULL)
# 2254|         {
# 2255|          /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def288]
cups-2.4.14/scheduler/auth.c:2342:11: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/scheduler/auth.c:2308:6: branch_false: following ‘false’ branch (when ‘replies’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/scheduler/auth.c:2317:15: branch_true: following ‘true’ branch (when ‘i < num_msg’)...
cups-2.4.14/scheduler/auth.c:2319:16: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:2328:37: acquire_memory: allocated here
cups-2.4.14/scheduler/auth.c:2317:15: branch_true: following ‘true’ branch (when ‘i < num_msg’)...
cups-2.4.14/scheduler/auth.c:2319:16: branch_true: ...to here
cups-2.4.14/scheduler/auth.c:2342:11: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
# 2340|   
# 2341|         default:
# 2342|->           free(replies);
# 2343|             return (PAM_CONV_ERR);
# 2344|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def289]
cups-2.4.14/scheduler/banners.c:162:5: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/banners.c:136:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/banners.c:148:15: branch_false: ...to here
cups-2.4.14/scheduler/banners.c:148:15: acquire_memory: allocated here
cups-2.4.14/scheduler/banners.c:148:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/banners.c:160:21: branch_false: ...to here
cups-2.4.14/scheduler/banners.c:160:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/banners.c:162:5: branch_true: ...to here
cups-2.4.14/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): [#def290]
cups-2.4.14/scheduler/banners.c:171:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/scheduler/banners.c:136:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/banners.c:148:15: branch_false: ...to here
cups-2.4.14/scheduler/banners.c:148:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/banners.c:160:21: branch_false: ...to here
cups-2.4.14/scheduler/banners.c:160:21: acquire_memory: allocated here
cups-2.4.14/scheduler/banners.c:160:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/banners.c:169:3: branch_false: ...to here
cups-2.4.14/scheduler/banners.c:171:3: danger: ‘<unknown>’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  169|     temp->filetype = filetype;
#  170|   
#  171|->   cupsArrayAdd(Banners, temp);
#  172|   }
#  173|   

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def292]
cups-2.4.14/scheduler/client.c:136:20: warning[-Wanalyzer-malloc-leak]: leak of ‘con’
cups-2.4.14/scheduler/client.c:103:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:111:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:114:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:122:14: branch_false: ...to here
cups-2.4.14/scheduler/client.c:122:14: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:122:6: branch_false: following ‘false’ branch (when ‘con’ is non-NULL)...
cups-2.4.14/scheduler/client.c:133:17: branch_false: ...to here
cups-2.4.14/scheduler/client.c:136:20: danger: ‘con’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/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): [#def293]
cups-2.4.14/scheduler/client.c:139:7: warning[-Wanalyzer-malloc-leak]: leak of ‘con’
cups-2.4.14/scheduler/client.c:103:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:111:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:114:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:122:14: branch_false: ...to here
cups-2.4.14/scheduler/client.c:122:14: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:122:6: branch_false: following ‘false’ branch (when ‘con’ is non-NULL)...
cups-2.4.14/scheduler/client.c:133:17: branch_false: ...to here
cups-2.4.14/scheduler/client.c:136:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:138:9: branch_true: ...to here
cups-2.4.14/scheduler/client.c:138:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:139:7: branch_true: ...to here
cups-2.4.14/scheduler/client.c:139:7: danger: ‘con’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/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): [#def294]
cups-2.4.14/scheduler/client.c:141:5: warning[-Wanalyzer-malloc-leak]: leak of ‘con’
cups-2.4.14/scheduler/client.c:103:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:111:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:114:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:122:14: branch_false: ...to here
cups-2.4.14/scheduler/client.c:122:14: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:122:6: branch_false: following ‘false’ branch (when ‘con’ is non-NULL)...
cups-2.4.14/scheduler/client.c:133:17: branch_false: ...to here
cups-2.4.14/scheduler/client.c:136:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:138:9: branch_true: ...to here
cups-2.4.14/scheduler/client.c:141:5: danger: ‘con’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/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): [#def295]
cups-2.4.14/scheduler/client.c:154:7: warning[-Wanalyzer-malloc-leak]: leak of ‘con’
cups-2.4.14/scheduler/client.c:103:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:111:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:114:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:122:14: branch_false: ...to here
cups-2.4.14/scheduler/client.c:122:14: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:122:6: branch_false: following ‘false’ branch (when ‘con’ is non-NULL)...
cups-2.4.14/scheduler/client.c:133:17: branch_false: ...to here
cups-2.4.14/scheduler/client.c:136:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:152:3: branch_false: ...to here
cups-2.4.14/scheduler/client.c:154:7: danger: ‘con’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/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: GCC_ANALYZER_WARNING (CWE-401): [#def296]
cups-2.4.14/scheduler/client.c:1849:23: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.14/scheduler/client.c:666:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:667:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:668:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:681:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:903:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.14/scheduler/client.c:1641:11: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1794:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1804:16: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1817:13: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1822:16: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1824:30: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1824:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1830:36: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1833:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1843:35: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1844:18: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1846:28: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1846:28: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:1847:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.14/scheduler/client.c:1849:23: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1849:23: danger: ‘clirange’ leaks here; was allocated at [(23)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/22)
# 1847|   		if ((cliclearance = strtok(clirange, "-")) != NULL)
# 1848|   		{
# 1849|-> 		  if (context_range_set(tmpcon, cliclearance) == -1)
# 1850|   		  {
# 1851|   		    cupsdSendError(con, HTTP_STATUS_SERVER_ERROR, CUPSD_AUTH_NONE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def297]
cups-2.4.14/scheduler/client.c:1861:23: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.14/scheduler/client.c:666:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:667:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:668:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:681:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:903:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.14/scheduler/client.c:1641:11: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1794:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1804:16: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1817:13: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1822:16: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1824:30: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1824:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1830:36: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1833:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1843:35: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1844:18: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1846:28: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1846:28: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:1847:20: branch_false: following ‘false’ branch (when ‘cliclearance’ is NULL)...
cups-2.4.14/scheduler/client.c:1861:23: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1861:23: danger: ‘clirange’ leaks here; was allocated at [(23)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/22)
# 1859|   		else
# 1860|   		{
# 1861|-> 		  if (context_range_set(tmpcon, (context_range_get(clicon))) == -1)
# 1862|   		  {
# 1863|   		    cupsdSendError(con, HTTP_STATUS_SERVER_ERROR, CUPSD_AUTH_NONE);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def298]
cups-2.4.14/scheduler/client.c:2082:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(*con.filename, 0)’
cups-2.4.14/scheduler/client.c:2069:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:2071:10: branch_true: ...to here
cups-2.4.14/scheduler/client.c:2071:10: acquire_resource: opened here
cups-2.4.14/scheduler/client.c:2073:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:2082:24: branch_false: ...to here
cups-2.4.14/scheduler/client.c:2082:24: danger: ‘open(*con.filename, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
# 2080|       }
# 2081|   
# 2082|->     fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
# 2083|     }
# 2084|     else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def299]
cups-2.4.14/scheduler/client.c:2128:3: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.14/scheduler/client.c:628:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.14/scheduler/client.c:666:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:667:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:668:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:681:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:903:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.14/scheduler/client.c:1641:11: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1794:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1804:16: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1817:13: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1822:16: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1824:30: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1824:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1830:36: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1833:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1843:35: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1844:18: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1846:28: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1846:28: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:1847:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.14/scheduler/client.c:1849:23: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1849:22: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1851:21: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1851:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2126|   
# 2127|   
# 2128|->   cupsdLogClient(con, CUPSD_LOG_DEBUG2, "cupsdSendError code=%d, auth_type=%d", code, auth_type);
# 2129|   
# 2130|   #ifdef HAVE_TLS

Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
cups-2.4.14/scheduler/client.c:2149:3: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.14/scheduler/client.c:628:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.14/scheduler/client.c:666:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:667:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:668:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:681:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:903:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.14/scheduler/client.c:1641:11: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1794:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1804:16: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1817:13: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1822:16: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1824:30: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1824:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1830:36: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1833:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1843:35: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1844:18: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1846:28: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1846:28: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:1847:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.14/scheduler/client.c:1849:23: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1849:22: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1851:21: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1851:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2147|     */
# 2148|   
# 2149|->   cupsdLogRequest(con, code);
# 2150|   
# 2151|    /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
cups-2.4.14/scheduler/client.c:2159:21: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.14/scheduler/client.c:628:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.14/scheduler/client.c:666:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:667:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:668:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:681:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:903:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.14/scheduler/client.c:1641:11: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1794:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1804:16: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1817:13: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1822:16: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1824:30: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1824:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1830:36: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1833:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1843:35: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1844:18: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1846:28: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1846:28: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:1847:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.14/scheduler/client.c:1849:23: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1849:22: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1851:21: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1851:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2157|     */
# 2158|   
# 2159|->   strlcpy(location, httpGetField(con->http, HTTP_FIELD_LOCATION), sizeof(location));
# 2160|   
# 2161|     httpClearFields(con->http);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def302]
cups-2.4.14/scheduler/client.c:2161:3: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.14/scheduler/client.c:628:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.14/scheduler/client.c:666:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:667:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:668:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:681:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:903:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.14/scheduler/client.c:1641:11: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1794:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1804:16: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1817:13: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1822:16: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1824:30: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1824:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1830:36: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1833:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1843:35: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1844:18: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1846:28: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1846:28: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:1847:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.14/scheduler/client.c:1849:23: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1849:22: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1851:21: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1851:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2159|     strlcpy(location, httpGetField(con->http, HTTP_FIELD_LOCATION), sizeof(location));
# 2160|   
# 2161|->   httpClearFields(con->http);
# 2162|     httpClearCookie(con->http);
# 2163|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def303]
cups-2.4.14/scheduler/client.c:2162:3: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.14/scheduler/client.c:628:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.14/scheduler/client.c:666:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:667:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:668:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:681:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:903:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.14/scheduler/client.c:1641:11: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1794:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1804:16: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1817:13: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1822:16: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1824:30: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1824:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1830:36: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1833:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1843:35: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1844:18: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1846:28: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1846:28: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:1847:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.14/scheduler/client.c:1849:23: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1849:22: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1851:21: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1851:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2160|   
# 2161|     httpClearFields(con->http);
# 2162|->   httpClearCookie(con->http);
# 2163|   
# 2164|     httpSetField(con->http, HTTP_FIELD_LOCATION, location);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def304]
cups-2.4.14/scheduler/client.c:2164:3: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.14/scheduler/client.c:628:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.14/scheduler/client.c:666:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:667:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:668:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:681:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:903:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.14/scheduler/client.c:1641:11: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1794:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1804:16: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1817:13: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1822:16: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1824:30: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1824:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1830:36: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1833:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1843:35: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1844:18: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1846:28: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1846:28: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:1847:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.14/scheduler/client.c:1849:23: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1849:22: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1851:21: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1851:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2162|     httpClearCookie(con->http);
# 2163|   
# 2164|->   httpSetField(con->http, HTTP_FIELD_LOCATION, location);
# 2165|   
# 2166|     if (code >= HTTP_STATUS_BAD_REQUEST && con->type != CUPSD_AUTH_NEGOTIATE)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def305]
cups-2.4.14/scheduler/client.c:2167:5: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.14/scheduler/client.c:628:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.14/scheduler/client.c:666:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:667:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:668:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:681:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:903:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.14/scheduler/client.c:1641:11: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1794:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1804:16: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1817:13: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1822:16: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1824:30: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1824:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1830:36: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1833:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1843:35: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1844:18: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1846:28: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1846:28: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:1847:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.14/scheduler/client.c:1849:23: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1849:22: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1851:21: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1851:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2165|   
# 2166|     if (code >= HTTP_STATUS_BAD_REQUEST && con->type != CUPSD_AUTH_NEGOTIATE)
# 2167|->     httpSetKeepAlive(con->http, HTTP_KEEPALIVE_OFF);
# 2168|   
# 2169|     if (httpGetVersion(con->http) >= HTTP_VERSION_1_1 &&

Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
cups-2.4.14/scheduler/client.c:2169:7: warning[-Wanalyzer-malloc-leak]: leak of ‘clirange’
cups-2.4.14/scheduler/client.c:628:1: enter_function: entry to ‘cupsdReadClient’
cups-2.4.14/scheduler/client.c:666:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:667:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:668:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:666:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:681:7: branch_false: ...to here
cups-2.4.14/scheduler/client.c:903:6: branch_false: following ‘false’ branch (when ‘status != 200’)...
cups-2.4.14/scheduler/client.c:1641:11: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1794:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1804:16: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1817:13: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1822:16: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1824:30: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1824:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1830:36: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1833:18: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:1843:35: branch_false: ...to here
cups-2.4.14/scheduler/client.c:1844:18: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1846:28: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1846:28: acquire_memory: allocated here
cups-2.4.14/scheduler/client.c:1847:20: branch_true: following ‘true’ branch (when ‘cliclearance’ is non-NULL)...
cups-2.4.14/scheduler/client.c:1849:23: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1849:22: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/client.c:1851:21: branch_true: ...to here
cups-2.4.14/scheduler/client.c:1851:21: call_function: calling ‘cupsdSendError’ from ‘cupsdReadClient’
# 2167|       httpSetKeepAlive(con->http, HTTP_KEEPALIVE_OFF);
# 2168|   
# 2169|->   if (httpGetVersion(con->http) >= HTTP_VERSION_1_1 &&
# 2170|         httpGetKeepAlive(con->http) == HTTP_KEEPALIVE_OFF)
# 2171|       httpSetField(con->http, HTTP_FIELD_CONNECTION, "close");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def307]
cups-2.4.14/scheduler/client.c:3413:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&fname, 131072)’
cups-2.4.14/scheduler/client.c:3400:8: acquire_resource: opened here
cups-2.4.14/scheduler/client.c:3402:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/client.c:3405:3: branch_false: ...to here
cups-2.4.14/scheduler/client.c:3413:7: danger: ‘open(&fname, 131072)’ leaks here; was opened at [(1)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/0)
# 3411|     close(in);
# 3412|   
# 3413|->   if (len < 0 || len >= sizeof(buf))
# 3414|       return (uid_t) -1;
# 3415|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def308]
cups-2.4.14/scheduler/colorman.c:1025:13: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def309]
cups-2.4.14/scheduler/colorman.c:1025:13: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def310]
cups-2.4.14/scheduler/colorman.c:1025:13: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def311]
cups-2.4.14/scheduler/colorman.c:1034:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def312]
cups-2.4.14/scheduler/colorman.c:1034:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def313]
cups-2.4.14/scheduler/colorman.c:1034:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def314]
cups-2.4.14/scheduler/colorman.c:1036:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def315]
cups-2.4.14/scheduler/colorman.c:1036:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def316]
cups-2.4.14/scheduler/colorman.c:1036:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def317]
cups-2.4.14/scheduler/colorman.c:1037:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def318]
cups-2.4.14/scheduler/colorman.c:1037:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def319]
cups-2.4.14/scheduler/colorman.c:1037:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def320]
cups-2.4.14/scheduler/colorman.c:1038:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def321]
cups-2.4.14/scheduler/colorman.c:1038:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def322]
cups-2.4.14/scheduler/colorman.c:1038:3: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def323]
cups-2.4.14/scheduler/colorman.c:1296:5: warning[-Wanalyzer-malloc-leak]: leak of ‘device_path’
cups-2.4.14/scheduler/colorman.c:1269:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1281:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1282:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1289:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1290:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/colorman.c:1291:19: branch_true: ...to here
cups-2.4.14/scheduler/colorman.c:1291:19: acquire_memory: allocated here
cups-2.4.14/scheduler/colorman.c:1295:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/colorman.c:1296:5: branch_true: ...to here
cups-2.4.14/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): [#def324]
cups-2.4.14/scheduler/colorman.c:1299:5: warning[-Wanalyzer-malloc-leak]: leak of ‘device_path’
cups-2.4.14/scheduler/colorman.c:1269:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1281:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1282:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1289:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1290:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/colorman.c:1291:19: branch_true: ...to here
cups-2.4.14/scheduler/colorman.c:1291:19: acquire_memory: allocated here
cups-2.4.14/scheduler/colorman.c:1298:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/colorman.c:1299:5: branch_true: ...to here
cups-2.4.14/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): [#def325]
cups-2.4.14/scheduler/colorman.c:1339:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/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): [#def326]
cups-2.4.14/scheduler/colorman.c:1350:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/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): [#def327]
cups-2.4.14/scheduler/colorman.c:1350:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/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): [#def328]
cups-2.4.14/scheduler/colorman.c:1401:14: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1401:14: danger: ‘format[0]’ 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): [#def329]
cups-2.4.14/scheduler/colorman.c:1401:14: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1401:14: danger: ‘format[1]’ 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): [#def330]
cups-2.4.14/scheduler/colorman.c:1401:14: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1401:14: danger: ‘format[2]’ 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): [#def331]
cups-2.4.14/scheduler/colorman.c:1403:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/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): [#def332]
cups-2.4.14/scheduler/colorman.c:1403:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1403:15: danger: ‘format[1]’ 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): [#def333]
cups-2.4.14/scheduler/colorman.c:1403:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1403:15: danger: ‘format[2]’ 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): [#def334]
cups-2.4.14/scheduler/colorman.c:1405:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.14/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.14/scheduler/colorman.c:1405:15: danger: ‘format[0]’ 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): [#def335]
cups-2.4.14/scheduler/colorman.c:1405:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.14/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.14/scheduler/colorman.c:1405:15: danger: ‘format[1]’ 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): [#def336]
cups-2.4.14/scheduler/colorman.c:1405:15: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.14/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.14/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): [#def337]
cups-2.4.14/scheduler/colorman.c:1414:11: warning[-Wanalyzer-malloc-leak]: leak of ‘format[0]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.14/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.14/scheduler/colorman.c:1406:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/colorman.c:1414:11: danger: ‘format[0]’ 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): [#def338]
cups-2.4.14/scheduler/colorman.c:1414:11: warning[-Wanalyzer-malloc-leak]: leak of ‘format[1]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.14/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.14/scheduler/colorman.c:1406:8: branch_true: following ‘true’ branch...
cups-2.4.14/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): [#def339]
cups-2.4.14/scheduler/colorman.c:1414:11: warning[-Wanalyzer-malloc-leak]: leak of ‘format[2]’
cups-2.4.14/scheduler/colorman.c:1364:1: enter_function: entry to ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1380:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1387:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1388:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/colorman.c:1395:3: branch_false: ...to here
cups-2.4.14/scheduler/colorman.c:1395:3: call_function: calling ‘colord_get_qualifier_format’ from ‘colord_register_printer’
cups-2.4.14/scheduler/colorman.c:1395:3: return_function: returning to ‘colord_register_printer’ from ‘colord_get_qualifier_format’
cups-2.4.14/scheduler/colorman.c:1404:8: branch_true: following ‘true’ branch (when ‘attr’ is non-NULL)...
cups-2.4.14/scheduler/colorman.c:1406:9: branch_true: ...to here
cups-2.4.14/scheduler/colorman.c:1406:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/colorman.c:1414:11: danger: ‘format[2]’ 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): [#def340]
cups-2.4.14/scheduler/conf.c:3208:9: warning[-Wanalyzer-malloc-leak]: leak of ‘lis’
cups-2.4.14/scheduler/conf.c:2990:1: enter_function: entry to ‘read_cupsd_conf’
cups-2.4.14/scheduler/conf.c:3008:10: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/conf.c:3014:10: branch_true: ...to here
cups-2.4.14/scheduler/conf.c:3049:13: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/conf.c:3119:16: branch_false: ...to here
cups-2.4.14/scheduler/conf.c:3119:14: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/conf.c:3138:11: branch_true: ...to here
cups-2.4.14/scheduler/conf.c:3156:18: call_function: calling ‘get_address’ from ‘read_cupsd_conf’
cups-2.4.14/scheduler/conf.c:3156:18: return_function: returning to ‘read_cupsd_conf’ from ‘get_address’
cups-2.4.14/scheduler/conf.c:3158:10: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/conf.c:3169:29: branch_true: following ‘true’ branch (when ‘addr’ is non-NULL)...
cups-2.4.14/scheduler/conf.c:3175:40: branch_true: ...to here
cups-2.4.14/scheduler/conf.c:3182:12: branch_false: following ‘false’ branch (when ‘lis’ is NULL)...
cups-2.4.14/scheduler/conf.c:3200:20: branch_false: ...to here
cups-2.4.14/scheduler/conf.c:3200:20: acquire_memory: allocated here
cups-2.4.14/scheduler/conf.c:3200:12: branch_false: following ‘false’ branch (when ‘lis’ is non-NULL)...
cups-2.4.14/scheduler/conf.c:3208:9: branch_false: ...to here
cups-2.4.14/scheduler/conf.c:3208:9: danger: ‘lis’ leaks here; was allocated at [(22)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/21)
# 3206|   	}
# 3207|   
# 3208|->         cupsArrayAdd(Listeners, lis);
# 3209|   
# 3210|          /*

Error: GCC_ANALYZER_WARNING: [#def341]
cups-2.4.14/scheduler/cupsfilter.c:904:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_true: following ‘true’ branch (when ‘infd > 0’)...
cups-2.4.14/scheduler/cupsfilter.c:904:9: branch_true: ...to here
cups-2.4.14/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): [#def342]
cups-2.4.14/scheduler/cupsfilter.c:905:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_true: following ‘true’ branch (when ‘infd > 0’)...
cups-2.4.14/scheduler/cupsfilter.c:904:9: branch_true: ...to here
cups-2.4.14/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): [#def343]
cups-2.4.14/scheduler/cupsfilter.c:912:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_true: following ‘true’ branch (when ‘outfd != 1’)...
cups-2.4.14/scheduler/cupsfilter.c:911:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:911:10: branch_true: following ‘true’ branch (when ‘outfd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:912:17: branch_true: ...to here
cups-2.4.14/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: [#def344]
cups-2.4.14/scheduler/cupsfilter.c:916:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘outfd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_true: following ‘true’ branch (when ‘outfd != 1’)...
cups-2.4.14/scheduler/cupsfilter.c:911:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:911:10: branch_true: following ‘true’ branch (when ‘outfd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:912:17: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:912:17: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:914:10: branch_true: following ‘true’ branch (when ‘outfd > 1’)...
cups-2.4.14/scheduler/cupsfilter.c:916:9: branch_true: ...to here
cups-2.4.14/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): [#def345]
cups-2.4.14/scheduler/cupsfilter.c:917:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_true: following ‘true’ branch (when ‘outfd != 1’)...
cups-2.4.14/scheduler/cupsfilter.c:911:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:911:10: branch_false: following ‘false’ branch (when ‘outfd >= 0’)...
cups-2.4.14/scheduler/cupsfilter.c:914:10: branch_false: ...to here
cups-2.4.14/scheduler/cupsfilter.c:914:10: branch_true: following ‘true’ branch (when ‘outfd > 1’)...
cups-2.4.14/scheduler/cupsfilter.c:916:9: branch_true: ...to here
cups-2.4.14/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): [#def346]
cups-2.4.14/scheduler/cupsfilter.c:917:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘outfd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_true: following ‘true’ branch (when ‘outfd != 1’)...
cups-2.4.14/scheduler/cupsfilter.c:911:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:911:10: branch_true: following ‘true’ branch (when ‘outfd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:912:17: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:912:17: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:914:10: branch_true: following ‘true’ branch (when ‘outfd > 1’)...
cups-2.4.14/scheduler/cupsfilter.c:916:9: branch_true: ...to here
cups-2.4.14/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): [#def347]
cups-2.4.14/scheduler/cupsfilter.c:921:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:921:15: acquire_resource: opened here
cups-2.4.14/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): [#def348]
cups-2.4.14/scheduler/cupsfilter.c:921:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.14/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: [#def349]
cups-2.4.14/scheduler/cupsfilter.c:923:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:921:15: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:921:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/cupsfilter.c:923:7: branch_true: ...to here
cups-2.4.14/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): [#def350]
cups-2.4.14/scheduler/cupsfilter.c:924:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.14/scheduler/cupsfilter.c:921:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/cupsfilter.c:923:7: branch_true: ...to here
cups-2.4.14/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): [#def351]
cups-2.4.14/scheduler/cupsfilter.c:924:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:921:15: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:921:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/cupsfilter.c:923:7: branch_true: ...to here
cups-2.4.14/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): [#def352]
cups-2.4.14/scheduler/cupsfilter.c:926:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.14/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): [#def353]
cups-2.4.14/scheduler/cupsfilter.c:928:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:928:15: acquire_resource: opened here
cups-2.4.14/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): [#def354]
cups-2.4.14/scheduler/cupsfilter.c:928:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.14/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: [#def355]
cups-2.4.14/scheduler/cupsfilter.c:930:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 2)’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:928:15: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:928:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/cupsfilter.c:930:7: branch_true: ...to here
cups-2.4.14/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): [#def356]
cups-2.4.14/scheduler/cupsfilter.c:931:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.14/scheduler/cupsfilter.c:928:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/cupsfilter.c:930:7: branch_true: ...to here
cups-2.4.14/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): [#def357]
cups-2.4.14/scheduler/cupsfilter.c:931:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:928:15: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:928:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/cupsfilter.c:930:7: branch_true: ...to here
cups-2.4.14/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): [#def358]
cups-2.4.14/scheduler/cupsfilter.c:933:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.14/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): [#def359]
cups-2.4.14/scheduler/cupsfilter.c:941:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘infd’
cups-2.4.14/scheduler/cupsfilter.c:889:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:897:8: branch_true: following ‘true’ branch (when ‘infd != 0’)...
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:899:10: branch_true: following ‘true’ branch (when ‘infd < 0’)...
cups-2.4.14/scheduler/cupsfilter.c:900:16: branch_true: ...to here
cups-2.4.14/scheduler/cupsfilter.c:900:16: acquire_resource: opened here
cups-2.4.14/scheduler/cupsfilter.c:902:10: branch_false: following ‘false’ branch (when ‘infd <= 0’)...
cups-2.4.14/scheduler/cupsfilter.c:909:8: branch_false: ...to here
cups-2.4.14/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): [#def360]
cups-2.4.14/scheduler/cupsfilter.c:1522:3: warning[-Wanalyzer-unsafe-call-within-signal-handler]: call to ‘exit’ from within signal handler
cups-2.4.14/scheduler/cupsfilter.c:1289:1: enter_function: entry to ‘get_job_file’
cups-2.4.14/scheduler/cupsfilter.c:1316:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/cupsfilter.c:1322:7: branch_false: ...to here
cups-2.4.14/scheduler/cupsfilter.c:1322:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/cupsfilter.c:1333:15: branch_false: ...to here
cups-2.4.14/scheduler/cupsfilter.c:1333:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/cupsfilter.c:1341:13: branch_false: ...to here
cups-2.4.14/scheduler/cupsfilter.c:1349:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/cupsfilter.c:1356:3: branch_false: ...to here
cups-2.4.14/scheduler/cupsfilter.c:1509:1: enter_function: entry to ‘sighandler’
cups-2.4.14/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): [#def361]
cups-2.4.14/scheduler/file.c:346:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(filename, 129)’
cups-2.4.14/scheduler/file.c:335:13: acquire_resource: opened here
cups-2.4.14/scheduler/file.c:335:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/file.c:343:7: branch_false: ...to here
cups-2.4.14/scheduler/file.c:343:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/file.c:345:5: branch_true: ...to here
cups-2.4.14/scheduler/file.c:346:12: danger: ‘open(filename, 129)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  344|     {
#  345|       close(fd);
#  346|->     return (-1);
#  347|     }
#  348|   

Error: CPPCHECK_WARNING (CWE-476): [#def362]
cups-2.4.14/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): [#def363]
cups-2.4.14/scheduler/job.c:1761:21: warning[-Wanalyzer-malloc-leak]: leak of ‘job’
cups-2.4.14/scheduler/job.c:4825:1: enter_function: entry to ‘load_request_root’
cups-2.4.14/scheduler/job.c:4838:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/job.c:4850:10: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/job.c:4851:16: branch_true: ...to here
cups-2.4.14/scheduler/job.c:4857:18: acquire_memory: allocated here
cups-2.4.14/scheduler/job.c:4857:10: branch_false: following ‘false’ branch (when ‘job’ is non-NULL)...
cups-2.4.14/scheduler/job.c:4868:30: branch_false: ...to here
cups-2.4.14/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): [#def364]
cups-2.4.14/scheduler/job.c:1763:5: warning[-Wanalyzer-malloc-leak]: leak of ‘job’
cups-2.4.14/scheduler/job.c:4825:1: enter_function: entry to ‘load_request_root’
cups-2.4.14/scheduler/job.c:4838:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/job.c:4850:10: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/job.c:4851:16: branch_true: ...to here
cups-2.4.14/scheduler/job.c:4857:18: acquire_memory: allocated here
cups-2.4.14/scheduler/job.c:4857:10: branch_false: following ‘false’ branch (when ‘job’ is non-NULL)...
cups-2.4.14/scheduler/job.c:4868:30: branch_false: ...to here
cups-2.4.14/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): [#def365]
cups-2.4.14/scheduler/job.c:1771:3: warning[-Wanalyzer-malloc-leak]: leak of ‘job’
cups-2.4.14/scheduler/job.c:4825:1: enter_function: entry to ‘load_request_root’
cups-2.4.14/scheduler/job.c:4838:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/job.c:4850:10: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/job.c:4851:16: branch_true: ...to here
cups-2.4.14/scheduler/job.c:4857:18: acquire_memory: allocated here
cups-2.4.14/scheduler/job.c:4857:10: branch_false: following ‘false’ branch (when ‘job’ is non-NULL)...
cups-2.4.14/scheduler/job.c:4868:30: branch_false: ...to here
cups-2.4.14/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): [#def366]
cups-2.4.14/scheduler/job.c:4588:7: warning[-Wanalyzer-malloc-leak]: leak of ‘job’
cups-2.4.14/scheduler/job.c:4490:1: enter_function: entry to ‘load_job_cache’
cups-2.4.14/scheduler/job.c:4505:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/job.c:4515:3: branch_false: ...to here
cups-2.4.14/scheduler/job.c:4521:10: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/job.c:4523:10: branch_true: ...to here
cups-2.4.14/scheduler/job.c:4523:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/job.c:4528:15: branch_false: ...to here
cups-2.4.14/scheduler/job.c:4528:13: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/job.c:4530:10: branch_true: ...to here
cups-2.4.14/scheduler/job.c:4530:10: branch_false: following ‘false’ branch (when ‘job’ is NULL)...
cups-2.4.14/scheduler/job.c:4536:11: branch_false: ...to here
cups-2.4.14/scheduler/job.c:4536:10: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/job.c:4542:15: call_function: inlined call to ‘atoi’ from ‘load_job_cache’
cups-2.4.14/scheduler/job.c:4544:10: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/job.c:4550:7: branch_false: ...to here
cups-2.4.14/scheduler/job.c:4570:13: acquire_memory: allocated here
cups-2.4.14/scheduler/job.c:4571:10: branch_false: following ‘false’ branch (when ‘job’ is non-NULL)...
cups-2.4.14/scheduler/job.c:4578:7: branch_false: ...to here
cups-2.4.14/scheduler/job.c:4588:7: danger: ‘job’ leaks here; was allocated at [(17)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/16)
# 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): [#def367]
cups-2.4.14/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): [#def368]
cups-2.4.14/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): [#def369]
cups-2.4.14/scheduler/log.c:616:24: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/log.c:570:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/log.c:593:10: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/log.c:595:3: branch_false: ...to here
cups-2.4.14/scheduler/log.c:597:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/log.c:599:8: branch_true: ...to here
cups-2.4.14/scheduler/log.c:599:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/log.c:609:19: acquire_memory: allocated here
cups-2.4.14/scheduler/log.c:609:10: branch_true: following ‘true’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/log.c:611:22: branch_true: ...to here
cups-2.4.14/scheduler/log.c:615:10: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/log.c:616:24: branch_true: ...to here
cups-2.4.14/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): [#def370]
cups-2.4.14/scheduler/log.c:620:9: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/log.c:570:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/log.c:593:10: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/log.c:595:3: branch_false: ...to here
cups-2.4.14/scheduler/log.c:597:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/log.c:599:8: branch_true: ...to here
cups-2.4.14/scheduler/log.c:599:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/log.c:609:19: acquire_memory: allocated here
cups-2.4.14/scheduler/log.c:609:10: branch_true: following ‘true’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/log.c:611:22: branch_true: ...to here
cups-2.4.14/scheduler/log.c:615:10: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/log.c:618:11: branch_false: ...to here
cups-2.4.14/scheduler/log.c:618:10: branch_true: following ‘true’ branch...
cups-2.4.14/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): [#def371]
cups-2.4.14/scheduler/log.c:718:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.14/scheduler/log.c:713:11: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/log.c:715:5: acquire_resource: ‘va_start’ called here
cups-2.4.14/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): [#def372]
cups-2.4.14/scheduler/log.c:739:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.14/scheduler/log.c:732:11: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/log.c:736:11: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/scheduler/log.c:738:5: branch_true: ...to here
cups-2.4.14/scheduler/log.c:738:5: acquire_resource: ‘va_start’ called here
cups-2.4.14/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): [#def373]
cups-2.4.14/scheduler/log.c:1311:5: warning[-Wanalyzer-malloc-leak]: leak of ‘log_line’
cups-2.4.14/scheduler/log.c:690:1: enter_function: entry to ‘cupsdLogMessage’
cups-2.4.14/scheduler/log.c:732:11: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/log.c:736:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/scheduler/log.c:749:3: branch_false: ...to here
cups-2.4.14/scheduler/log.c:754:14: call_function: calling ‘format_log_line’ from ‘cupsdLogMessage’
cups-2.4.14/scheduler/log.c:754:14: return_function: returning to ‘cupsdLogMessage’ from ‘format_log_line’
cups-2.4.14/scheduler/log.c:757:10: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/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): [#def374]
cups-2.4.14/scheduler/log.c:1321:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cups-2.4.14/scheduler/log.c:690:1: enter_function: entry to ‘cupsdLogMessage’
cups-2.4.14/scheduler/log.c:732:11: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/log.c:736:11: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/scheduler/log.c:749:3: branch_false: ...to here
cups-2.4.14/scheduler/log.c:749:3: acquire_resource: ‘va_start’ called here
cups-2.4.14/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): [#def375]
cups-2.4.14/scheduler/main.c:341:11: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ConfigurationFile’ where non-null expected
cups-2.4.14/scheduler/main.c:103:1: enter_function: entry to ‘main’
cups-2.4.14/scheduler/main.c:149:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/main.c:162:8: branch_false: ...to here
cups-2.4.14/scheduler/main.c:332:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/main.c:333:5: branch_true: ...to here
cups-2.4.14/scheduler/main.c:333:5: call_function: calling ‘cupsdSetString’ from ‘main’
cups-2.4.14/scheduler/main.c:333:5: return_function: returning to ‘main’ from ‘cupsdSetString’
cups-2.4.14/scheduler/main.c:335:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/main.c:341:11: branch_true: ...to here
cups-2.4.14/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
#argument 1 of ‘__builtin_strlen’ must be non-null
#  339|       size_t	len;			/* Size of buffer */
#  340|   
#  341|->     len = strlen(ConfigurationFile) + 15;
#  342|       if ((filename = malloc(len)) == NULL)
#  343|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def376]
cups-2.4.14/scheduler/main.c:1933:5: warning[-Wanalyzer-malloc-leak]: leak of ‘lis’
cups-2.4.14/scheduler/main.c:1897:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/main.c:1903:3: branch_false: ...to here
cups-2.4.14/scheduler/main.c:1919:6: branch_false: following ‘false’ branch (when ‘lis’ is NULL)...
cups-2.4.14/scheduler/main.c:1925:5: branch_false: ...to here
cups-2.4.14/scheduler/main.c:1927:16: acquire_memory: allocated here
cups-2.4.14/scheduler/main.c:1927:8: branch_false: following ‘false’ branch (when ‘lis’ is non-NULL)...
cups-2.4.14/scheduler/main.c:1933:5: branch_false: ...to here
cups-2.4.14/scheduler/main.c:1933:5: danger: ‘lis’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/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): [#def377]
cups-2.4.14/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): [#def378]
cups-2.4.14/scheduler/mime.c:566:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/scheduler/mime.c:654:1: enter_function: entry to ‘mime_load_convs’
cups-2.4.14/scheduler/mime.c:679:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/mime.c:691:10: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/mime.c:697:10: branch_true: ...to here
cups-2.4.14/scheduler/mime.c:697:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:704:27: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:729:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:732:5: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:741:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:744:20: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:744:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/mime.c:758:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:761:12: call_function: inlined call to ‘atoi’ from ‘mime_load_convs’
cups-2.4.14/scheduler/mime.c:768:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:773:9: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:773:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
cups-2.4.14/scheduler/mime.c:779:12: branch_true: ...to here
cups-2.4.14/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): [#def379]
cups-2.4.14/scheduler/mime.c:566:7: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/mime.c:654:1: enter_function: entry to ‘mime_load_convs’
cups-2.4.14/scheduler/mime.c:679:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/mime.c:691:10: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/mime.c:697:10: branch_true: ...to here
cups-2.4.14/scheduler/mime.c:697:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:704:27: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:729:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:732:5: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:741:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:744:20: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:744:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/mime.c:758:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:761:12: call_function: inlined call to ‘atoi’ from ‘mime_load_convs’
cups-2.4.14/scheduler/mime.c:768:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:773:9: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:773:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
cups-2.4.14/scheduler/mime.c:779:12: branch_true: ...to here
cups-2.4.14/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): [#def380]
cups-2.4.14/scheduler/mime.c:569:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/scheduler/mime.c:654:1: enter_function: entry to ‘mime_load_convs’
cups-2.4.14/scheduler/mime.c:679:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/mime.c:691:10: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/mime.c:697:10: branch_true: ...to here
cups-2.4.14/scheduler/mime.c:697:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:704:27: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:729:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:732:5: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:741:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:744:20: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:744:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/mime.c:758:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:761:12: call_function: inlined call to ‘atoi’ from ‘mime_load_convs’
cups-2.4.14/scheduler/mime.c:768:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:773:9: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:773:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
cups-2.4.14/scheduler/mime.c:779:12: branch_true: ...to here
cups-2.4.14/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): [#def381]
cups-2.4.14/scheduler/mime.c:569:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/mime.c:654:1: enter_function: entry to ‘mime_load_convs’
cups-2.4.14/scheduler/mime.c:679:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/mime.c:691:10: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/mime.c:697:10: branch_true: ...to here
cups-2.4.14/scheduler/mime.c:697:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:704:27: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:729:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:732:5: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:741:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:744:20: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:744:8: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/mime.c:758:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:761:12: call_function: inlined call to ‘atoi’ from ‘mime_load_convs’
cups-2.4.14/scheduler/mime.c:768:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/mime.c:773:9: branch_false: ...to here
cups-2.4.14/scheduler/mime.c:773:8: branch_true: following ‘true’ branch (when the strings are non-equal)...
cups-2.4.14/scheduler/mime.c:779:12: branch_true: ...to here
cups-2.4.14/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): [#def382]
cups-2.4.14/scheduler/policy.c:54:5: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/policy.c:40:6: branch_false: following ‘false’ branch (when ‘policy’ is non-NULL)...
cups-2.4.14/scheduler/policy.c:43:7: branch_false: ...to here
cups-2.4.14/scheduler/policy.c:49:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/policy.c:52:15: branch_false: ...to here
cups-2.4.14/scheduler/policy.c:52:15: acquire_memory: allocated here
cups-2.4.14/scheduler/policy.c:52:6: branch_true: following ‘true’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/policy.c:54:5: branch_true: ...to here
cups-2.4.14/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): [#def383]
cups-2.4.14/scheduler/printers.c:2003:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/scheduler/printers.c:1965:15: acquire_memory: allocated here
cups-2.4.14/scheduler/printers.c:1965:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1977:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:1996:8: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:2003:17: danger: ‘ptr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 2001|       */
# 2002|   
# 2003|->     if ((attr = ippFindAttribute(p->attrs, name, IPP_TAG_INTEGER)) != NULL &&
# 2004|           attr->num_values < count)
# 2005|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def384]
cups-2.4.14/scheduler/printers.c:2006:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/scheduler/printers.c:1965:15: acquire_memory: allocated here
cups-2.4.14/scheduler/printers.c:1965:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1977:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:1996:8: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:2003:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/printers.c:2004:9: branch_true: ...to here
cups-2.4.14/scheduler/printers.c:2003:9: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/printers.c:2006:7: branch_true: ...to here
cups-2.4.14/scheduler/printers.c:2006:7: danger: ‘ptr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 2004|           attr->num_values < count)
# 2005|       {
# 2006|->       ippDeleteAttribute(p->attrs, attr);
# 2007|         attr = NULL;
# 2008|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def385]
cups-2.4.14/scheduler/printers.c:2013:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/scheduler/printers.c:1965:15: acquire_memory: allocated here
cups-2.4.14/scheduler/printers.c:1965:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1977:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:1996:8: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:2013:14: danger: ‘ptr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 2011|         attr->num_values = count;
# 2012|       else
# 2013|->       attr = ippAddIntegers(p->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, name,
# 2014|                               count, NULL);
# 2015|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def386]
cups-2.4.14/scheduler/printers.c:2049:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/scheduler/printers.c:1965:15: acquire_memory: allocated here
cups-2.4.14/scheduler/printers.c:1965:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1977:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:1996:8: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1996:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:2049:17: danger: ‘ptr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 2047|         value_tag = IPP_TAG_NAME;
# 2048|   
# 2049|->     if ((attr = ippFindAttribute(p->attrs, name, value_tag)) != NULL &&
# 2050|           attr->num_values < count)
# 2051|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def387]
cups-2.4.14/scheduler/printers.c:2052:7: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/scheduler/printers.c:1965:15: acquire_memory: allocated here
cups-2.4.14/scheduler/printers.c:1965:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1977:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:1996:8: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1996:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:2049:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/printers.c:2050:9: branch_true: ...to here
cups-2.4.14/scheduler/printers.c:2049:9: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/printers.c:2052:7: branch_true: ...to here
cups-2.4.14/scheduler/printers.c:2052:7: danger: ‘ptr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0)
# 2050|           attr->num_values < count)
# 2051|       {
# 2052|->       ippDeleteAttribute(p->attrs, attr);
# 2053|         attr = NULL;
# 2054|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def388]
cups-2.4.14/scheduler/printers.c:2059:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/scheduler/printers.c:1965:15: acquire_memory: allocated here
cups-2.4.14/scheduler/printers.c:1965:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1977:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:1996:8: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1996:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:2049:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/printers.c:2050:9: branch_true: ...to here
cups-2.4.14/scheduler/printers.c:2049:9: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/scheduler/printers.c:2058:19: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/printers.c:2059:22: branch_true: ...to here
cups-2.4.14/scheduler/printers.c:2059:9: danger: ‘ptr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 2057|       {
# 2058|         for (i = 0; i < attr->num_values; i ++)
# 2059|-> 	_cupsStrFree(attr->values[i].string.text);
# 2060|   
# 2061|         attr->num_values = count;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def389]
cups-2.4.14/scheduler/printers.c:2064:14: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/scheduler/printers.c:1965:15: acquire_memory: allocated here
cups-2.4.14/scheduler/printers.c:1965:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1977:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:1996:8: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1996:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:2064:14: danger: ‘ptr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
# 2062|       }
# 2063|       else
# 2064|->       attr = ippAddStrings(p->attrs, IPP_TAG_PRINTER, value_tag, name,
# 2065|                              count, NULL, NULL);
# 2066|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def390]
cups-2.4.14/scheduler/printers.c:2085:11: warning[-Wanalyzer-malloc-leak]: leak of ‘ptr’
cups-2.4.14/scheduler/printers.c:1965:15: acquire_memory: allocated here
cups-2.4.14/scheduler/printers.c:1965:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1977:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:1996:8: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:1996:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:2067:8: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:2076:5: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:2076:43: branch_true: following ‘true’ branch (when ‘i < count’)...
 branch_true: ...to here
cups-2.4.14/scheduler/printers.c:2078:25: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/printers.c:2080:12: branch_true: ...to here
cups-2.4.14/scheduler/printers.c:2080:12: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/printers.c:2082:17: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:2082:17: branch_false: following ‘false’ branch (when ‘quote == 0’)...
cups-2.4.14/scheduler/printers.c:2084:17: branch_false: ...to here
cups-2.4.14/scheduler/printers.c:2084:17: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/printers.c:2085:11: danger: ‘ptr’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 2083|   	  continue;
# 2084|   	else if (*ptr == '\\' && ptr[1])
# 2085|-> 	  _cups_strcpy(ptr, ptr + 1);
# 2086|   	else if (*ptr == '\'' || *ptr == '\"')
# 2087|   	{

Error: GCC_ANALYZER_WARNING (CWE-401): [#def391]
cups-2.4.14/scheduler/process.c:832:9: warning[-Wanalyzer-malloc-leak]: leak of ‘proc’
cups-2.4.14/scheduler/process.c:515:7: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/process.c:574:10: branch_true: following ‘true’ branch (when ‘i != 100’)...
cups-2.4.14/scheduler/process.c:574:74: branch_true: ...to here
cups-2.4.14/scheduler/process.c:821:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/process.c:823:9: branch_true: ...to here
cups-2.4.14/scheduler/process.c:826:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/process.c:828:52: branch_true: ...to here
cups-2.4.14/scheduler/process.c:828:19: acquire_memory: allocated here
cups-2.4.14/scheduler/process.c:828:10: branch_true: following ‘true’ branch (when ‘proc’ is non-NULL)...
cups-2.4.14/scheduler/process.c:830:24: branch_true: ...to here
cups-2.4.14/scheduler/process.c:831:24: branch_false: following ‘false’ branch (when ‘job’ is NULL)...
cups-2.4.14/scheduler/process.c:831:9: branch_false: ...to here
cups-2.4.14/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): [#def392]
cups-2.4.14/scheduler/select.c:273:10: warning[-Wanalyzer-malloc-leak]: leak of ‘fdptr’
cups-2.4.14/scheduler/select.c:254:6: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
cups-2.4.14/scheduler/select.c:261:16: branch_false: ...to here
cups-2.4.14/scheduler/select.c:261:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/select.c:267:18: branch_true: ...to here
cups-2.4.14/scheduler/select.c:267:18: acquire_memory: allocated here
cups-2.4.14/scheduler/select.c:267:8: branch_false: following ‘false’ branch (when ‘fdptr’ is non-NULL)...
cups-2.4.14/scheduler/select.c:270:5: branch_false: ...to here
cups-2.4.14/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): [#def393]
cups-2.4.14/scheduler/subscriptions.c:363:3: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/scheduler/subscriptions.c:283:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/subscriptions.c:296:7: branch_false: ...to here
cups-2.4.14/scheduler/subscriptions.c:354:15: acquire_memory: allocated here
cups-2.4.14/scheduler/subscriptions.c:354:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/scheduler/subscriptions.c:363:3: branch_false: ...to here
cups-2.4.14/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): [#def394]
cups-2.4.14/scheduler/util.c:257:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
cups-2.4.14/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.14/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): [#def395]
cups-2.4.14/scheduler/util.c:257:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[0]’
cups-2.4.14/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.14/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): [#def396]
cups-2.4.14/scheduler/util.c:257:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
cups-2.4.14/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.14/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): [#def397]
cups-2.4.14/scheduler/util.c:259:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
cups-2.4.14/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.14/scheduler/util.c:257:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/util.c:259:5: branch_true: ...to here
cups-2.4.14/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): [#def398]
cups-2.4.14/scheduler/util.c:260:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
cups-2.4.14/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.14/scheduler/util.c:257:6: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/util.c:259:5: branch_true: ...to here
cups-2.4.14/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): [#def399]
cups-2.4.14/scheduler/util.c:267:30: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fds[1]’
cups-2.4.14/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.14/scheduler/util.c:257:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:267:30: branch_false: ...to here
cups-2.4.14/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): [#def400]
cups-2.4.14/scheduler/util.c:302:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
cups-2.4.14/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.14/scheduler/util.c:257:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:267:30: branch_false: ...to here
cups-2.4.14/scheduler/util.c:267:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:281:15: branch_false: ...to here
cups-2.4.14/scheduler/util.c:281:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:293:11: branch_false: ...to here
cups-2.4.14/scheduler/util.c:293:11: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/util.c:299:10: branch_true: ...to here
cups-2.4.14/scheduler/util.c:302:15: acquire_resource: opened here
cups-2.4.14/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: [#def401]
cups-2.4.14/scheduler/util.c:304:7: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘open("/dev/null", 0)’
cups-2.4.14/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.14/scheduler/util.c:257:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:267:30: branch_false: ...to here
cups-2.4.14/scheduler/util.c:267:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:281:15: branch_false: ...to here
cups-2.4.14/scheduler/util.c:281:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:293:11: branch_false: ...to here
cups-2.4.14/scheduler/util.c:293:11: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/util.c:299:10: branch_true: ...to here
cups-2.4.14/scheduler/util.c:302:15: acquire_resource: opened here
cups-2.4.14/scheduler/util.c:302:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/util.c:304:7: branch_true: ...to here
cups-2.4.14/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): [#def402]
cups-2.4.14/scheduler/util.c:305:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
cups-2.4.14/scheduler/util.c:247:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:257:30: branch_false: ...to here
cups-2.4.14/scheduler/util.c:257:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:267:30: branch_false: ...to here
cups-2.4.14/scheduler/util.c:267:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:281:15: branch_false: ...to here
cups-2.4.14/scheduler/util.c:281:6: branch_false: following ‘false’ branch...
cups-2.4.14/scheduler/util.c:293:11: branch_false: ...to here
cups-2.4.14/scheduler/util.c:293:11: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/util.c:299:10: branch_true: ...to here
cups-2.4.14/scheduler/util.c:302:15: acquire_resource: opened here
cups-2.4.14/scheduler/util.c:302:8: branch_true: following ‘true’ branch...
cups-2.4.14/scheduler/util.c:304:7: branch_true: ...to here
cups-2.4.14/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): [#def403]
cups-2.4.14/tools/ippevepcl.c:271:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/tools/ippevepcl.c:266:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/tools/ippevepcl.c:268:15: branch_true: ...to here
cups-2.4.14/tools/ippevepcl.c:268:15: acquire_resource: opened here
cups-2.4.14/tools/ippevepcl.c:268:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippevepcl.c:279:3: branch_false: ...to here
cups-2.4.14/tools/ippevepcl.c:292:6: branch_false: following ‘false’ branch (when ‘fd == 0’)...
 branch_false: ...to here
cups-2.4.14/tools/ippevepcl.c:271:14: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  269|       {
#  270|         fprintf(stderr, "ERROR: Unable to open \"%s\": %s\n", filename, strerror(errno));
#  271|->       return (1);
#  272|       }
#  273|     }

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

Error: GCC_ANALYZER_WARNING (CWE-775): [#def406]
cups-2.4.14/tools/ippevepcl.c:488:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/tools/ippevepcl.c:471:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/tools/ippevepcl.c:473:15: branch_true: ...to here
cups-2.4.14/tools/ippevepcl.c:473:15: acquire_resource: opened here
cups-2.4.14/tools/ippevepcl.c:473:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippevepcl.c:488:14: branch_false: ...to here
cups-2.4.14/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: CPPCHECK_WARNING (CWE-476): [#def407]
cups-2.4.14/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): [#def408]
cups-2.4.14/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): [#def409]
cups-2.4.14/tools/ippeveps.c:251:3: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/tools/ippeveps.c:895:1: enter_function: entry to ‘ps_to_ps’
cups-2.4.14/tools/ippeveps.c:913:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/tools/ippeveps.c:915:15: branch_true: ...to here
cups-2.4.14/tools/ippeveps.c:915:15: acquire_resource: opened here
cups-2.4.14/tools/ippeveps.c:915:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:931:22: branch_false: ...to here
cups-2.4.14/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): [#def410]
cups-2.4.14/tools/ippeveps.c:251:3: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/tools/ippeveps.c:895:1: enter_function: entry to ‘ps_to_ps’
cups-2.4.14/tools/ippeveps.c:913:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/tools/ippeveps.c:915:15: branch_true: ...to here
cups-2.4.14/tools/ippeveps.c:915:15: acquire_memory: allocated here
cups-2.4.14/tools/ippeveps.c:915:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:931:22: branch_false: ...to here
cups-2.4.14/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): [#def411]
cups-2.4.14/tools/ippeveps.c:287:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def412]
cups-2.4.14/tools/ippeveps.c:287:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def413]
cups-2.4.14/tools/ippeveps.c:291:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def414]
cups-2.4.14/tools/ippeveps.c:291:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def415]
cups-2.4.14/tools/ippeveps.c:292:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def416]
cups-2.4.14/tools/ippeveps.c:292:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def417]
cups-2.4.14/tools/ippeveps.c:564:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/tools/ippeveps.c:559:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/tools/ippeveps.c:561:15: branch_true: ...to here
cups-2.4.14/tools/ippeveps.c:561:15: acquire_resource: opened here
cups-2.4.14/tools/ippeveps.c:561:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:577:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:583:8: branch_false: following ‘false’ branch (when ‘fd == 0’)...
cups-2.4.14/tools/ippeveps.c:586:12: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:564:14: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
#  562|       {
#  563|         fprintf(stderr, "ERROR: Unable to open \"%s\": %s\n", filename, strerror(errno));
#  564|->       return (1);
#  565|       }
#  566|     }

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-775): [#def421]
cups-2.4.14/tools/ippeveps.c:697:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/tools/ippeveps.c:559:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/tools/ippeveps.c:561:15: branch_true: ...to here
cups-2.4.14/tools/ippeveps.c:561:15: acquire_resource: opened here
cups-2.4.14/tools/ippeveps.c:561:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:577:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:579:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:674:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:697:20: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
#  695|   
#  696|   #else
#  697|->   if ((page_size = ppdPageSize(ppd, NULL)) != NULL)
#  698|     {
#  699|       page_left   = page_size->left;

Error: GCC_ANALYZER_WARNING: [#def422]
cups-2.4.14/tools/ippeveps.c:833:5: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_true: following ‘true’ branch (when ‘pid == 0’)...
cups-2.4.14/tools/ippeveps.c:832:5: branch_true: ...to here
cups-2.4.14/tools/ippeveps.c:832:5: release_resource: closed here
cups-2.4.14/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): [#def423]
cups-2.4.14/tools/ippeveps.c:958:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def424]
cups-2.4.14/tools/ippeveps.c:958:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def425]
cups-2.4.14/tools/ippeveps.c:960:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def426]
cups-2.4.14/tools/ippeveps.c:960:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def427]
cups-2.4.14/tools/ippeveps.c:976:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def428]
cups-2.4.14/tools/ippeveps.c:976:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def429]
cups-2.4.14/tools/ippeveps.c:978:11: warning[-Wanalyzer-file-leak]: leak of FILE ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def430]
cups-2.4.14/tools/ippeveps.c:978:11: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
cups-2.4.14/tools/ippeveps.c:777:1: enter_function: entry to ‘pdf_to_ps’
cups-2.4.14/tools/ippeveps.c:797:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:807:16: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:826:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:839:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cups-2.4.14/tools/ippeveps.c:858:5: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:866:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:882:12: branch_false: ...to here
cups-2.4.14/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): [#def431]
cups-2.4.14/tools/ippeveps.c:1064:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cups-2.4.14/tools/ippeveps.c:1047:6: branch_true: following ‘true’ branch (when ‘filename’ is non-NULL)...
cups-2.4.14/tools/ippeveps.c:1049:15: branch_true: ...to here
cups-2.4.14/tools/ippeveps.c:1049:15: acquire_resource: opened here
cups-2.4.14/tools/ippeveps.c:1049:8: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:1064:14: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:1064:14: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/24/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): [#def432]
cups-2.4.14/tools/ippeveps.c:1122:11: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
cups-2.4.14/tools/ippeveps.c:1031:1: enter_function: entry to ‘raster_to_ps’
cups-2.4.14/tools/ippeveps.c:1064:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:1070:3: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:1070:3: call_function: calling ‘dsc_header’ from ‘raster_to_ps’
cups-2.4.14/tools/ippeveps.c:1070:3: return_function: returning to ‘raster_to_ps’ from ‘dsc_header’
cups-2.4.14/tools/ippeveps.c:1072:10: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippeveps.c:1074:5: branch_true: ...to here
cups-2.4.14/tools/ippeveps.c:1083:13: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippeveps.c:1089:19: branch_false: ...to here
cups-2.4.14/tools/ippeveps.c:1089:12: acquire_memory: allocated here
cups-2.4.14/tools/ippeveps.c:1120:33: branch_true: following ‘true’ branch (when ‘y != 0’)...
cups-2.4.14/tools/ippeveps.c:1122:11: branch_true: ...to here
cups-2.4.14/tools/ippeveps.c:1122:11: danger: ‘line’ leaks here; was allocated at [(13)](sarif:/runs/0/results/25/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): [#def433]
cups-2.4.14/tools/ippfind.c:337:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
cups-2.4.14/tools/ippfind.c:200:1: enter_function: entry to ‘main’
cups-2.4.14/tools/ippfind.c:275:15: branch_true: following ‘true’ branch (when ‘i < argc’)...
cups-2.4.14/tools/ippfind.c:277:13: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:277:8: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:279:11: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:279:10: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:285:14: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:285:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:302:19: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:302:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:317:19: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:317:17: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/tools/ippfind.c:319:11: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:320:14: branch_false: following ‘false’ branch (when ‘argc > i’)...
cups-2.4.14/tools/ippfind.c:328:37: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:327:23: call_function: calling ‘new_expr’ from ‘main’
cups-2.4.14/tools/ippfind.c:327:23: return_function: returning to ‘main’ from ‘new_expr’
cups-2.4.14/tools/ippfind.c:327:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:331:18: branch_true: following ‘true’ branch (when ‘i < argc’)...
cups-2.4.14/tools/ippfind.c:332:29: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:337:14: danger: ‘<unknown>’ leaks here; was allocated at [(28)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/27)
#  335|                 i ++;
#  336|   
#  337|->           if (i >= argc)
#  338|             {
#  339|               _cupsLangPrintf(stderr, _("ippfind: Expected semi-colon after %s."),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def434]
cups-2.4.14/tools/ippfind.c:1570:11: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
cups-2.4.14/tools/ippfind.c:1530:1: enter_function: entry to ‘browse_callback’
cups-2.4.14/tools/ippfind.c:1567:19: call_function: calling ‘get_service’ from ‘browse_callback’
cups-2.4.14/tools/ippfind.c:1567:19: return_function: returning to ‘browse_callback’ from ‘get_service’
cups-2.4.14/tools/ippfind.c:1569:12: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1570:11: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1570:11: danger: dereference of NULL ‘get_service(context,  name,  type,  domain)’
# 1568|   
# 1569|   	if (flags & AVAHI_LOOKUP_RESULT_LOCAL)
# 1570|-> 	  service->is_local = 1;
# 1571|   	break;
# 1572|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def435]
cups-2.4.14/tools/ippfind.c:1941:5: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.14/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:6: branch_true: following ‘true’ branch (when ‘myargv’ is NULL)...
cups-2.4.14/tools/ippfind.c:1941:5: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1941:5: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/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): [#def436]
cups-2.4.14/tools/ippfind.c:1968:13: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.14/tools/ippfind.c:1947:20: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1954:40: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1962:32: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1966:14: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1968:13: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1968:13: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/3/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): [#def437]
cups-2.4.14/tools/ippfind.c:1968:13: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.14/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.14/tools/ippfind.c:1947:20: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1954:40: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1962:32: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1966:14: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1968:13: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1968:13: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/4/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): [#def438]
cups-2.4.14/tools/ippfind.c:1990:31: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.14/tools/ippfind.c:1947:20: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1954:40: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1962:32: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1962:40: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1966:14: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1966:14: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1973:11: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1974:14: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1976:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1978:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1978:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1980:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1980:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1982:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1982:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1984:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1984:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1986:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1986:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1988:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1988:19: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1990:31: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1990:31: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2)
# 1988|   	  else if (!strncmp(keyword, "txt_", 4))
# 1989|   	  {
# 1990|-> 	    const char *val = cupsGetOption(keyword + 4, service->num_txt, service->txt);
# 1991|   	    if (val)
# 1992|   	      strlcpy(tptr, val, sizeof(temp) - (size_t)(tptr - temp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def439]
cups-2.4.14/tools/ippfind.c:1990:31: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.14/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.14/tools/ippfind.c:1947:20: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1954:40: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1962:32: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1962:40: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1966:14: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1966:14: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1973:11: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1974:14: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1976:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1978:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1978:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1980:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1980:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1982:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1982:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1984:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1984:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1986:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1986:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1988:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1988:19: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1990:31: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1990:31: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0)
# 1988|   	  else if (!strncmp(keyword, "txt_", 4))
# 1989|   	  {
# 1990|-> 	    const char *val = cupsGetOption(keyword + 4, service->num_txt, service->txt);
# 1991|   	    if (val)
# 1992|   	      strlcpy(tptr, val, sizeof(temp) - (size_t)(tptr - temp));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def440]
cups-2.4.14/tools/ippfind.c:1998:13: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.14/tools/ippfind.c:1947:20: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1954:40: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1962:32: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1962:40: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1966:14: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1966:14: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1973:11: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1974:14: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1976:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1978:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1978:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1980:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1980:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1982:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1982:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1984:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1984:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1986:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1986:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1988:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1988:19: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1998:13: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1998:13: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
# 1996|   	  else
# 1997|   	  {
# 1998|-> 	    _cupsLangPrintf(stderr, _("ippfind: Unknown variable \"{%s}\"."),
# 1999|   	                    keyword);
# 2000|   	    exit(IPPFIND_EXIT_SYNTAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def441]
cups-2.4.14/tools/ippfind.c:1998:13: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.14/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_true: following ‘true’ branch (when ‘i < num_args’)...
cups-2.4.14/tools/ippfind.c:1947:20: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1947:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1954:40: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1956:12: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:1962:32: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:1962:40: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1966:14: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1966:14: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1973:11: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1974:14: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1976:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1978:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1978:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1980:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1980:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1982:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1982:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1984:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1984:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1986:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1986:19: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:1988:21: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1988:19: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:1998:13: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1998:13: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
# 1996|   	  else
# 1997|   	  {
# 1998|-> 	    _cupsLangPrintf(stderr, _("ippfind: Unknown variable \"{%s}\"."),
# 1999|   	                    keyword);
# 2000|   	    exit(IPPFIND_EXIT_SYNTAX);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def442]
cups-2.4.14/tools/ippfind.c:2037:13: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.14/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2037:13: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/9/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): [#def443]
cups-2.4.14/tools/ippfind.c:2037:13: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.14/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.14/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2037:13: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/10/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): [#def444]
cups-2.4.14/tools/ippfind.c:2039:5: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.14/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2037:11: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:2039:5: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:2039:5: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/11/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): [#def445]
cups-2.4.14/tools/ippfind.c:2039:5: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.14/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.14/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2037:11: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:2039:5: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:2039:5: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/12/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): [#def446]
cups-2.4.14/tools/ippfind.c:2066:5: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.14/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2037:11: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:2044:7: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2055:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2064:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.14/tools/ippfind.c:2067:39: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:2066:5: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/14/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): [#def447]
cups-2.4.14/tools/ippfind.c:2066:5: warning[-Wanalyzer-malloc-leak]: leak of ‘myenvp’
cups-2.4.14/tools/ippfind.c:1914:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.14/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2037:11: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:2044:7: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2055:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2064:11: branch_true: following ‘true’ branch (when ‘pid < 0’)...
cups-2.4.14/tools/ippfind.c:2067:39: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:2066:5: danger: ‘myenvp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/13/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): [#def448]
cups-2.4.14/tools/ippfind.c:2076:12: warning[-Wanalyzer-malloc-leak]: leak of ‘myargv’
cups-2.4.14/tools/ippfind.c:1914:6: branch_false: following ‘false’ branch (when ‘myenvp’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1939:17: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:1939:6: branch_false: following ‘false’ branch (when ‘myargv’ is non-NULL)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:1945:15: branch_false: following ‘false’ branch (when ‘i >= num_args’)...
cups-2.4.14/tools/ippfind.c:2035:7: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2035:6: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:2037:35: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2037:11: branch_false: following ‘false’ branch...
cups-2.4.14/tools/ippfind.c:2044:7: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2055:6: branch_false: following ‘false’ branch (when ‘pid != 0’)...
cups-2.4.14/tools/ippfind.c:2064:11: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2064:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2076:12: danger: ‘myargv’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2)
# 2074|       */
# 2075|   
# 2076|->     while (wait(&status) != pid)
# 2077|         ;
# 2078|     }

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

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

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

Error: GCC_ANALYZER_WARNING (CWE-401): [#def452]
cups-2.4.14/tools/ippfind.c:2436:15: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/tools/ippfind.c:2404:15: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:2404:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/tools/ippfind.c:2407:3: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2410:6: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:2411:5: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:2434:6: branch_true: following ‘true’ branch (when ‘regex’ is non-NULL)...
cups-2.4.14/tools/ippfind.c:2436:23: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:2436:15: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/19/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: GCC_ANALYZER_WARNING (CWE-401): [#def453]
cups-2.4.14/tools/ippfind.c:2453:28: warning[-Wanalyzer-malloc-leak]: leak of ‘new_expr(16, invert, 0, 0,  argv + (long unsigned int)i * 8)’
cups-2.4.14/tools/ippfind.c:200:1: enter_function: entry to ‘main’
cups-2.4.14/tools/ippfind.c:275:15: branch_true: following ‘true’ branch (when ‘i < argc’)...
cups-2.4.14/tools/ippfind.c:277:13: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:277:8: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:279:11: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:279:10: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:285:14: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:285:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:302:19: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:302:17: branch_false: following ‘false’ branch (when the strings are non-equal)...
cups-2.4.14/tools/ippfind.c:317:19: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:317:17: branch_true: following ‘true’ branch (when the strings are equal)...
cups-2.4.14/tools/ippfind.c:319:11: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:320:14: branch_false: following ‘false’ branch (when ‘argc > i’)...
cups-2.4.14/tools/ippfind.c:328:37: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:327:23: call_function: calling ‘new_expr’ from ‘main’
cups-2.4.14/tools/ippfind.c:327:23: return_function: returning to ‘main’ from ‘new_expr’
cups-2.4.14/tools/ippfind.c:327:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
cups-2.4.14/tools/ippfind.c:331:18: branch_true: following ‘true’ branch (when ‘i < argc’)...
cups-2.4.14/tools/ippfind.c:332:29: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:2453:28: danger: ‘new_expr(16, invert, 0, 0,  argv + (long unsigned int)i * 8)’ leaks here; was allocated at [(18)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/17)
# 2451|       int	num_args;			/* Number of arguments */
# 2452|   
# 2453|->     for (num_args = 1; args[num_args]; num_args ++)
# 2454|         if (!strcmp(args[num_args], ";"))
# 2455|           break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def454]
cups-2.4.14/tools/ippfind.c:2459:8: warning[-Wanalyzer-malloc-leak]: leak of ‘temp’
cups-2.4.14/tools/ippfind.c:2404:15: acquire_memory: allocated here
cups-2.4.14/tools/ippfind.c:2404:6: branch_false: following ‘false’ branch (when ‘temp’ is non-NULL)...
cups-2.4.14/tools/ippfind.c:2407:3: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2410:6: branch_true: following ‘true’ branch...
cups-2.4.14/tools/ippfind.c:2411:5: branch_true: ...to here
cups-2.4.14/tools/ippfind.c:2434:6: branch_false: following ‘false’ branch (when ‘regex’ is NULL)...
cups-2.4.14/tools/ippfind.c:2449:6: branch_false: ...to here
cups-2.4.14/tools/ippfind.c:2449:6: branch_true: following ‘true’ branch (when ‘args’ is non-NULL)...
 branch_true: ...to here
cups-2.4.14/tools/ippfind.c:2459:8: branch_true: following ‘true’ branch...
 branch_true: ...to here
cups-2.4.14/tools/ippfind.c:2459:8: danger: ‘temp’ leaks here; was allocated at [(1)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/0)
# 2457|       temp->num_args = num_args;
# 2458|       temp->args     = malloc((size_t)num_args * sizeof(char *));
# 2459|->     if (temp->args == NULL)
# 2460|         return (NULL);
# 2461|   

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

Error: GCC_ANALYZER_WARNING (CWE-688): [#def456]
cups-2.4.14/tools/ippfind.c:2594:27: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘strdup(hostTarget)’ where non-null expected
cups-2.4.14/tools/ippfind.c:2591:26: acquire_memory: this call could return NULL
cups-2.4.14/tools/ippfind.c:2594:27: danger: argument 1 (‘strdup(hostTarget)’) from [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
#argument 1 of ‘__builtin_strlen’ must be non-null
# 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.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
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-208.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-gcc-latest-x86_64
project-namecups-2.4.14-2.fc44
store-results-to/tmp/tmpuudc_4ju/cups-2.4.14-2.fc44.tar.xz
time-created2025-10-28 17:41:04
time-finished2025-10-28 17:45:07
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpuudc_4ju/cups-2.4.14-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpuudc_4ju/cups-2.4.14-2.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9