Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 640888 Details for
Bug 874662
NULL pointer dereferencing found by Coverity
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
List of all defects added in environment-modules-3.2.9c-4.el6
environment-modules.added.err (text/plain), 192.57 KB, created by
Ondrej Oprala
on 2012-11-08 15:37:46 UTC
(
hide
)
Description:
List of all defects added in environment-modules-3.2.9c-4.el6
Filename:
MIME Type:
Creator:
Ondrej Oprala
Created:
2012-11-08 15:37:46 UTC
Size:
192.57 KB
patch
obsolete
>Error: BUFFER_SIZE_WARNING (CWE-170): >/builddir/build/BUILD/modules-3.2.9/utility.c:2593: cond_false: Condition "string == NULL", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2593: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2596: cond_true: Condition "NULL == (result = stringer(NULL, 0, string, NULL))", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2597: cond_false: Condition "OK != Module_Error(ERR_STRING, module_name, 2597, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2598: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2601: cond_false: Condition "(dollarptr = __coverity_strchr(result, 36)) == NULL", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2603: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2623: cond_true: Condition "dollarptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2624: cond_true: Condition "*oldbuffer", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2628: cond_true: Condition "dollarptr[1] == '{'", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2631: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2637: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2638: cond_true: Condition "*slashptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2641: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2641: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2644: cond_true: Condition "result != dollarptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2644: cond_true: Condition "*(dollarptr - 1) == '\\'", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2649: cond_true: Condition "brace", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2651: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2664: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2668: cond_true: Condition "slashptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2672: cond_true: Condition "dollarptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2675: cond_true: Condition "dollarptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2677: buffer_size_warning: Calling strncpy with a maximum size argument of 1024 bytes on destination array "oldbuffer" of size 1024 bytes might leave the destination string unterminated. >/builddir/build/BUILD/modules-3.2.9/utility.c:2679: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2681: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2682: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2623: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2623: cond_true: Condition "dollarptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2624: cond_true: Condition "*oldbuffer", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2628: cond_false: Condition "dollarptr[1] == '{'", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2631: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2631: cond_true: Condition "dollarptr[1] == '$'", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2633: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2637: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2638: cond_false: Condition "*slashptr", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2641: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2644: cond_true: Condition "result != dollarptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2644: cond_true: Condition "*(dollarptr - 1) == '\\'", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2649: cond_true: Condition "brace", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2651: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2664: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2668: cond_false: Condition "slashptr", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2679: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2682: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2623: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2623: cond_false: Condition "dollarptr", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2682: loop_end: Reached end of loop > >Error: FORWARD_NULL (CWE-476): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:485: cond_false: Condition "NULL == (dirlst_head = get_dir(dir, NULL, &count, &tcount))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:487: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:489: cond_true: Condition "NULL == (list = (char **)module_malloc(tcount * 8UL /* sizeof (char **) */))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:489: var_compare_op: Comparing "list" to null implies that "list" might be null. >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:490: cond_false: Condition "OK != Module_Error(ERR_ALLOC, module_name, 490, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:491: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:493: var_deref_model: Passing null pointer "list" to function "dirlst_to_list(char **, fi_ent *, int, int *, char *, char *)", which dereferences it. >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:986:5: cond_true: Condition "module", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:998:5: cond_true: Condition "i < count", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:998:5: cond_true: Condition "dirlst_cur", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1002:9: cond_true: Condition "dirlst_cur->fi_prefix", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1004:6: cond_true: Condition "path", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1005:3: cond_false: Condition "NULL == stringer(buf, 1024, path, "/", dirlst_cur->fi_prefix, "/", dirlst_cur->fi_name, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1008:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1009:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1013:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1016:9: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1025:9: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1031:2: cond_false: Condition "!module", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1031:2: cond_true: Condition "!__coverity_strncmp(module, buf, mlen)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1037:6: deref_parm: Directly dereferencing parameter "list". > >Error: FORWARD_NULL (CWE-476): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:432: cond_true: Condition "sw_format & (28 /* (4 | 8) | 0x10 */)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:432: cond_true: Condition "!(sw_format & (34 /* 2 | 0x20 */))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:440: cond_true: Condition "dir", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:441: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:443: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:449: cond_true: Condition "module", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:451: cond_true: Condition "dir", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:452: cond_false: Condition "NULL == (selection = stringer(NULL, 0, dir, "/", module, NULL))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:456: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:458: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:459: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:461: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:462: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:509: cond_true: Condition "!cache_list", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:518: cond_false: Condition "NULL == (dirlst_head = get_dir(dir, NULL, &count, &tcount))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:520: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:522: cond_true: Condition "NULL == (cache_list = (char **)module_malloc(tcount * 8UL /* sizeof (char **) */))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:522: var_compare_op: Comparing "cache_list" to null implies that "cache_list" might be null. >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:524: cond_false: Condition "OK != Module_Error(ERR_ALLOC, module_name, 524, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:525: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:548: cond_true: Condition "dir", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:551: cond_true: Condition "s", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:552: cond_false: Condition "s = __coverity_strchr(s, 47)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:555: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:555: break: Breaking from loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:562: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:572: cond_true: Condition "dir", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:572: cond_true: Condition "selection", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:580: cond_false: Condition "sw_format & 0x20", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:582: var_deref_model: Passing null pointer "cache_list" to function "delete_cache_list(char **, int)", which dereferences it. >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1490:5: cond_true: Condition "i < tcount", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1491:9: deref_parm_field_in_call: Function "null_free(void **)" dereferences an offset off "list". >/builddir/build/BUILD/modules-3.2.9/utility.c:2984:2: deref_parm: Directly dereferencing parameter "var". > >Error: FORWARD_NULL (CWE-476): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:432: cond_true: Condition "sw_format & (28 /* (4 | 8) | 0x10 */)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:432: cond_true: Condition "!(sw_format & (34 /* 2 | 0x20 */))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:440: cond_true: Condition "dir", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:441: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:443: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:449: cond_true: Condition "module", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:451: cond_true: Condition "dir", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:452: cond_false: Condition "NULL == (selection = stringer(NULL, 0, dir, "/", module, NULL))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:456: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:458: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:459: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:461: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:462: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:509: cond_true: Condition "!cache_list", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:518: cond_false: Condition "NULL == (dirlst_head = get_dir(dir, NULL, &count, &tcount))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:520: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:522: cond_true: Condition "NULL == (cache_list = (char **)module_malloc(tcount * 8UL /* sizeof (char **) */))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:522: var_compare_op: Comparing "cache_list" to null implies that "cache_list" might be null. >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:524: cond_false: Condition "OK != Module_Error(ERR_ALLOC, module_name, 524, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:525: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:529: var_deref_model: Passing null pointer "cache_list" to function "dirlst_to_list(char **, fi_ent *, int, int *, char *, char *)", which dereferences it. >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:986:5: cond_true: Condition "module", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:998:5: cond_true: Condition "i < count", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:998:5: cond_true: Condition "dirlst_cur", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1002:9: cond_true: Condition "dirlst_cur->fi_prefix", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1004:6: cond_true: Condition "path", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1005:3: cond_false: Condition "NULL == stringer(buf, 1024, path, "/", dirlst_cur->fi_prefix, "/", dirlst_cur->fi_name, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1008:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1009:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1013:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1016:9: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1025:9: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1031:2: cond_false: Condition "!module", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1031:2: cond_true: Condition "!__coverity_strncmp(module, buf, mlen)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1037:6: deref_parm: Directly dereferencing parameter "list". > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/utility.c:1653: cond_true: Condition "lmfiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1656: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/utility.c:1656: var_assign: Assigning: "lmfiles" = storage returned from "EMGetEnv(interp, "_LMFILES_")". >/builddir/build/BUILD/modules-3.2.9/utility.c:1662: cond_false: Condition "!lmfiles", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1662: cond_false: Condition "!*lmfiles", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1708: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1715: noescape: Resource "lmfiles" is not freed or pointed-to in function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:1717: cond_false: Condition "!tmp", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1719: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1725: overwrite_var: Overwriting "lmfiles" in "lmfiles = tmp" leaks the storage that "lmfiles" points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/utility.c:1653: cond_true: Condition "lmfiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1662: cond_false: Condition "!lmfiles", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1662: cond_true: Condition "!*lmfiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_false: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1696: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1706: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_false: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1696: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1706: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_false: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1696: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1705: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/utility.c:1705: var_assign: Assigning: "cptr" = storage returned from "EMGetEnv(interp, buffer)". >/builddir/build/BUILD/modules-3.2.9/utility.c:1706: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1684: noescape: Resource "cptr" is not freed or pointed-to in function "strlen(char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_false: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1696: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1698: noescape: Resource "cptr" is not freed or pointed-to in function "strncpy(char * restrict, char const * restrict, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:1705: overwrite_var: Overwriting "cptr" in "cptr = EMGetEnv(interp, buffer)" leaks the storage that "cptr" points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/utility.c:1653: cond_true: Condition "lmfiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1662: cond_false: Condition "!lmfiles", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1662: cond_true: Condition "!*lmfiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_false: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1696: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1706: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_false: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1696: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1706: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_false: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1696: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1705: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/utility.c:1705: var_assign: Assigning: "cptr" = storage returned from "EMGetEnv(interp, buffer)". >/builddir/build/BUILD/modules-3.2.9/utility.c:1706: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1684: noescape: Resource "cptr" is not freed or pointed-to in function "strlen(char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_true: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1694: cond_true: Condition "OK != Module_Error(ERR_ALLOC, module_name, 1694, NULL)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1695: leaked_storage: Variable "cptr" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/utility.c:1653: cond_true: Condition "lmfiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1662: cond_false: Condition "!lmfiles", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1662: cond_true: Condition "!*lmfiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_false: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1696: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1706: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_false: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1696: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1706: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1692: cond_false: Condition "!(lmfiles = (char *)module_realloc(lmfiles, lmsize * 1UL /* sizeof (char) */ + 1))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1696: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1705: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/utility.c:1705: var_assign: Assigning: "cptr" = storage returned from "EMGetEnv(interp, buffer)". >/builddir/build/BUILD/modules-3.2.9/utility.c:1706: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1679: cond_false: Condition "*cptr", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1706: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1708: leaked_storage: Variable "cptr" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/utility.c:1824: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/utility.c:1824: var_assign: Assigning: "loaded_modules" = storage returned from "EMGetEnv(interp, "LOADEDMODULES")". >/builddir/build/BUILD/modules-3.2.9/utility.c:1835: cond_false: Condition "!loaded_modules", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1835: cond_false: Condition "!*loaded_modules", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1837: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1844: noescape: Resource "loaded_modules" is not freed or pointed-to in function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:1844: cond_false: Condition "NULL == (l_modules = stringer(NULL, 0, loaded_modules, NULL))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1846: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1853: cond_true: Condition "loaded_modulefiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1854: cond_false: Condition "NULL == (l_modulefiles = stringer(NULL, 0, loaded_modulefiles, NULL))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1857: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1864: cond_true: Condition "realname", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1867: cond_true: Condition "*l_modules", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1876: cond_true: Condition "loadedmodule_path", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1878: cond_false: Condition "NULL == (loaded = stringer(NULL, 0, loadedmodule_path, NULL))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1881: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1887: cond_true: Condition "!__coverity_strcmp(loaded, modulename)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1890: break: Breaking from loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1930: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1936: cond_true: Condition "loadedmodule_path", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1937: cond_true: Condition "filename", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1937: cond_true: Condition "l_modulefiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1937: cond_true: Condition "*l_modulefiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1948: cond_false: Condition "count", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1964: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1976: goto: Jumping to label "success0" >/builddir/build/BUILD/modules-3.2.9/utility.c:1993: label: Reached label "success0" >/builddir/build/BUILD/modules-3.2.9/utility.c:1994: cond_true: Condition "l_modulefiles", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1997: leaked_storage: Variable "loaded_modules" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/utility.c:1824: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/utility.c:1824: var_assign: Assigning: "loaded_modules" = storage returned from "EMGetEnv(interp, "LOADEDMODULES")". >/builddir/build/BUILD/modules-3.2.9/utility.c:1835: cond_false: Condition "!loaded_modules", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1835: cond_true: Condition "!*loaded_modules", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1836: goto: Jumping to label "unwind0" >/builddir/build/BUILD/modules-3.2.9/utility.c:1989: label: Reached label "unwind0" >/builddir/build/BUILD/modules-3.2.9/utility.c:1991: leaked_storage: Variable "loaded_modules" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/utility.c:2149: cond_true: Condition "g_flags & 1", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2152: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2155: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2164: cond_true: Condition "g_flags & 1", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2167: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2170: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2177: cond_true: Condition "g_flags & 1", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2178: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:2178: var_assign: Assigning: "module" = storage returned from "stringer(NULL, 0, modulename, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2179: var_assign: Assigning: "basename" = "module". >/builddir/build/BUILD/modules-3.2.9/utility.c:2180: noescape: Resource "basename" is not freed or pointed-to in function "get_module_basename(char *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2080:41: noescape: "get_module_basename(char *)" does not free or save its pointer parameter "modulename". >/builddir/build/BUILD/modules-3.2.9/utility.c:2180: cond_false: Condition "basename = get_module_basename(basename)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2184: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2191: leaked_storage: Variable "module" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/utility.c:1019: cond_true: Condition "shell_derelict != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1025: cond_true: Condition "!__coverity_strcmp((char *)shell_derelict, "csh")", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1040: cond_true: Condition "!__coverity_strcmp(var, "_LMFILES_")", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1048: cond_true: Condition "(lmfiles_len = strlen(escaped)) > 1000", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1055: cond_true: Condition "lmfiles_len > 1000", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1066: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1055: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1055: cond_true: Condition "lmfiles_len > 1000", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1066: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1055: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1055: cond_false: Condition "lmfiles_len > 1000", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1066: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1068: cond_true: Condition "lmfiles_len", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1080: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1083: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1089: cond_false: Condition "cptr", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1089: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1092: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1092: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1096: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1096: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1088: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1089: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1091: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/utility.c:1091: var_assign: Assigning: "cptr" = storage returned from "EMGetEnv(interp, formatted)". >/builddir/build/BUILD/modules-3.2.9/utility.c:1092: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1092: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1096: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1096: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1088: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1089: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1091: overwrite_var: Overwriting "cptr" in "cptr = EMGetEnv(interp, formatted)" leaks the storage that "cptr" points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/utility.c:1019: cond_true: Condition "shell_derelict != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1025: cond_true: Condition "!__coverity_strcmp((char *)shell_derelict, "csh")", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1040: cond_true: Condition "!__coverity_strcmp(var, "_LMFILES_")", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1048: cond_true: Condition "(lmfiles_len = strlen(escaped)) > 1000", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1055: cond_true: Condition "lmfiles_len > 1000", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1066: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1055: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1055: cond_true: Condition "lmfiles_len > 1000", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1066: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1055: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1055: cond_false: Condition "lmfiles_len > 1000", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1066: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1068: cond_true: Condition "lmfiles_len", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1080: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1083: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1089: cond_false: Condition "cptr", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1089: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1092: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1092: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1096: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1096: cond_true: Condition "*cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1088: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:1089: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1091: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/utility.c:1091: var_assign: Assigning: "cptr" = storage returned from "EMGetEnv(interp, formatted)". >/builddir/build/BUILD/modules-3.2.9/utility.c:1092: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1092: cond_false: Condition "*cptr", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1095: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:1096: cond_true: Condition "cptr", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1096: cond_false: Condition "*cptr", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:1101: leaked_storage: Variable "cptr" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:485: alloc_fn: Storage is returned from allocation function "get_dir(char *, char *, int *, int *)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:738:5: cond_false: Condition "!(dirptr = opendir(dir))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:744:5: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:750:5: cond_false: Condition "!(dirlst_cur = dirlst_head = (fi_ent *)module_malloc(8800UL /* 50 * sizeof (fi_ent) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:757:5: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_true: Condition "dp != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:9: cond_true: Condition "*dp->d_name == '.'", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:33: continue: Continuing loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop: Looping back >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_true: Condition "dp != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:9: cond_false: Condition "*dp->d_name == '.'", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:33: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:773:9: cond_true: Condition "dirlst_cur == dirlst_last", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: cond_false: Condition "!(dirlst_head = (fi_ent *)module_realloc((char *)dirlst_head, (count << 1) * 176UL /* sizeof (fi_ent) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:777:7: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:786:9: cond_true: Condition "!(dirname = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:787:6: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 787, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:791:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:793:9: cond_false: Condition "stat(dirname, &dirlst_cur->fi_stats) < 0", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:798:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:804:9: cond_true: Condition "dirlst_cur->fi_stats.st_mode & 16384", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:813:13: cond_true: Condition "!(tmp = mkdirnm(prefix, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:814:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 814, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:818:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:819:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:823:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:825:13: cond_true: Condition "!(tmp = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:826:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 826, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:830:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:831:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:835:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:841:6: cond_true: Condition "!__coverity_strcmp("CVS", dp->d_name)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:845:3: cond_true: Condition "NULL == stringer(buffer, 1024, tmp, "/.version", NULL)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:847:7: cond_false: Condition "OK != Module_Error(ERR_STRING, module_name, 847, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:848:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:849:3: cond_false: Condition "NULL == (fi = fopen(buffer, "r"))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:852:10: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:878:13: cond_true: Condition "!dirlst_cur->fi_listcount", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:888:9: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:894:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_false: Condition "0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_true: Condition "NULL == (dirlst_cur->fi_name = ((0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */) ? ((char const *)dp->d_name[0] == 0) ? (char *)calloc(1UL /* (size_t)1 */, 1UL /* (size_t)1 */) : ({...}) : __strdup(dp->d_name)))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:902:6: cond_false: Condition "OK != Module_Error(ERR_ALLOC, module_name, 902, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:903:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_true: Condition "dp != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:9: cond_false: Condition "*dp->d_name == '.'", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:33: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:773:9: cond_true: Condition "dirlst_cur == dirlst_last", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: cond_false: Condition "!(dirlst_head = (fi_ent *)module_realloc((char *)dirlst_head, (count << 1) * 176UL /* sizeof (fi_ent) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:777:7: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:786:9: cond_true: Condition "!(dirname = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:787:6: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 787, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:791:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:793:9: cond_false: Condition "stat(dirname, &dirlst_cur->fi_stats) < 0", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:798:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:804:9: cond_true: Condition "dirlst_cur->fi_stats.st_mode & 16384", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:813:13: cond_true: Condition "!(tmp = mkdirnm(prefix, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:814:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 814, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:818:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:819:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:823:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:825:13: cond_true: Condition "!(tmp = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:826:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 826, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:830:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:831:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:835:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:841:6: cond_true: Condition "!__coverity_strcmp("CVS", dp->d_name)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:845:3: cond_true: Condition "NULL == stringer(buffer, 1024, tmp, "/.version", NULL)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:847:7: cond_false: Condition "OK != Module_Error(ERR_STRING, module_name, 847, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:848:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:849:3: cond_false: Condition "NULL == (fi = fopen(buffer, "r"))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:852:10: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:878:13: cond_true: Condition "!dirlst_cur->fi_listcount", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:888:9: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:894:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_false: Condition "0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_true: Condition "NULL == (dirlst_cur->fi_name = ((0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */) ? ((char const *)dp->d_name[0] == 0) ? (char *)calloc(1UL /* (size_t)1 */, 1UL /* (size_t)1 */) : ({...}) : __strdup(dp->d_name)))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:902:6: cond_false: Condition "OK != Module_Error(ERR_ALLOC, module_name, 902, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:903:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_true: Condition "dp != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:9: cond_false: Condition "*dp->d_name == '.'", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:33: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:773:9: cond_true: Condition "dirlst_cur == dirlst_last", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: cond_false: Condition "!(dirlst_head = (fi_ent *)module_realloc((char *)dirlst_head, (count << 1) * 176UL /* sizeof (fi_ent) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:777:7: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:786:9: cond_true: Condition "!(dirname = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:787:6: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 787, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:791:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:793:9: cond_false: Condition "stat(dirname, &dirlst_cur->fi_stats) < 0", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:798:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:804:9: cond_true: Condition "dirlst_cur->fi_stats.st_mode & 16384", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:813:13: cond_true: Condition "!(tmp = mkdirnm(prefix, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:814:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 814, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:818:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:819:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:823:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:825:13: cond_true: Condition "!(tmp = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:826:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 826, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:830:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:831:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:835:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:841:6: cond_true: Condition "!__coverity_strcmp("CVS", dp->d_name)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:845:3: cond_true: Condition "NULL == stringer(buffer, 1024, tmp, "/.version", NULL)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:847:7: cond_false: Condition "OK != Module_Error(ERR_STRING, module_name, 847, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:848:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:849:3: cond_false: Condition "NULL == (fi = fopen(buffer, "r"))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:852:10: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:878:13: cond_true: Condition "!dirlst_cur->fi_listcount", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:888:9: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:894:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_false: Condition "0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_true: Condition "NULL == (dirlst_cur->fi_name = ((0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */) ? ((char const *)dp->d_name[0] == 0) ? (char *)calloc(1UL /* (size_t)1 */, 1UL /* (size_t)1 */) : ({...}) : __strdup(dp->d_name)))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:902:6: cond_false: Condition "OK != Module_Error(ERR_ALLOC, module_name, 902, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:903:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_true: Condition "dp != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:9: cond_false: Condition "*dp->d_name == '.'", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:33: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:773:9: cond_true: Condition "dirlst_cur == dirlst_last", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: alloc_fn: Storage is returned from allocation function "module_realloc(void *, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2562:2: alloc_fn: Storage is returned from allocation function "realloc(void *, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2562:2: var_assign: Assigning: "ret" = "realloc(ptr, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2565:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: var_assign: Assigning: "dirlst_head" = "module_realloc((char *)dirlst_head, (count << 1) * 176UL)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: cond_false: Condition "!(dirlst_head = (fi_ent *)module_realloc((char *)dirlst_head, (count << 1) * 176UL /* sizeof (fi_ent) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:777:7: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:778:13: var_assign: Assigning: "dirlst_cur" = "dirlst_head". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:779:13: var_assign: Assigning: "dirlst_last" = "dirlst_head". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:786:9: cond_true: Condition "!(dirname = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:787:6: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 787, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:791:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:793:9: cond_false: Condition "stat(dirname, &dirlst_cur->fi_stats) < 0", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:798:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:804:9: cond_true: Condition "dirlst_cur->fi_stats.st_mode & 16384", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:813:13: cond_true: Condition "!(tmp = mkdirnm(prefix, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:814:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 814, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:818:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:819:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:823:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:825:13: cond_true: Condition "!(tmp = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:826:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 826, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:830:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:831:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:835:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:841:6: cond_true: Condition "!__coverity_strcmp("CVS", dp->d_name)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:845:3: cond_true: Condition "NULL == stringer(buffer, 1024, tmp, "/.version", NULL)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:847:7: cond_false: Condition "OK != Module_Error(ERR_STRING, module_name, 847, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:848:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:849:3: cond_true: Condition "NULL == (fi = fopen(buffer, "r"))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:851:4: continue: Continuing loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop: Looping back >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_false: Condition "dp != NULL", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:921:5: cond_true: Condition "count > 1", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:922:2: noescape: Resource "dirlst_head" is not freed or pointed-to in function "qsort(void *, size_t, size_t, __compar_fn_t)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:928:5: cond_true: Condition "-1 == closedir(dirptr)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:929:2: cond_false: Condition "OK != Module_Error(ERR_CLOSEDIR, module_name, 929, dir, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:930:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:933:5: return_alloc: Returning allocated memory "dirlst_head". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:485: var_assign: Assigning: "dirlst_head" = storage returned from "get_dir(dir, NULL, &count, &tcount)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:485: cond_false: Condition "NULL == (dirlst_head = get_dir(dir, NULL, &count, &tcount))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:487: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:489: cond_false: Condition "NULL == (list = (char **)module_malloc(tcount * 8UL /* sizeof (char **) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:491: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:493: noescape: Resource "dirlst_head" is not freed or pointed-to in function "dirlst_to_list(char **, fi_ent *, int, int *, char *, char *)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:971:13: noescape: "dirlst_to_list(char **, fi_ent *, int, int *, char *, char *)" does not free or save its pointer parameter "dirlst_head". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:507: cond_false: Condition "i < tcount", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:584: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:590: noescape: Resource "dirlst_head" is not freed or pointed-to in function "delete_dirlst(fi_ent *, int)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:1077:29: noescape: "delete_dirlst(fi_ent *, int)" does not free or save its pointer parameter "dirlst_head". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Whatis.c:597: leaked_storage: Variable "dirlst_head" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:432: cond_true: Condition "sw_format & (28 /* (4 | 8) | 0x10 */)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:432: cond_true: Condition "!(sw_format & (34 /* 2 | 0x20 */))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:440: cond_true: Condition "dir", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:441: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:443: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:449: cond_true: Condition "module", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:451: cond_true: Condition "dir", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:452: cond_false: Condition "NULL == (selection = stringer(NULL, 0, dir, "/", module, NULL))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:456: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:458: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:459: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:461: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:462: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:509: cond_true: Condition "!cache_list", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:518: alloc_fn: Storage is returned from allocation function "get_dir(char *, char *, int *, int *)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:738:5: cond_false: Condition "!(dirptr = opendir(dir))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:744:5: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:750:5: cond_false: Condition "!(dirlst_cur = dirlst_head = (fi_ent *)module_malloc(8800UL /* 50 * sizeof (fi_ent) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:757:5: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_true: Condition "dp != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:9: cond_true: Condition "*dp->d_name == '.'", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:33: continue: Continuing loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop: Looping back >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_true: Condition "dp != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:9: cond_false: Condition "*dp->d_name == '.'", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:33: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:773:9: cond_true: Condition "dirlst_cur == dirlst_last", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: cond_false: Condition "!(dirlst_head = (fi_ent *)module_realloc((char *)dirlst_head, (count << 1) * 176UL /* sizeof (fi_ent) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:777:7: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:786:9: cond_true: Condition "!(dirname = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:787:6: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 787, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:791:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:793:9: cond_false: Condition "stat(dirname, &dirlst_cur->fi_stats) < 0", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:798:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:804:9: cond_true: Condition "dirlst_cur->fi_stats.st_mode & 16384", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:813:13: cond_true: Condition "!(tmp = mkdirnm(prefix, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:814:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 814, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:818:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:819:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:823:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:825:13: cond_true: Condition "!(tmp = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:826:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 826, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:830:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:831:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:835:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:841:6: cond_true: Condition "!__coverity_strcmp("CVS", dp->d_name)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:845:3: cond_true: Condition "NULL == stringer(buffer, 1024, tmp, "/.version", NULL)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:847:7: cond_false: Condition "OK != Module_Error(ERR_STRING, module_name, 847, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:848:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:849:3: cond_false: Condition "NULL == (fi = fopen(buffer, "r"))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:852:10: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:878:13: cond_true: Condition "!dirlst_cur->fi_listcount", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:888:9: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:894:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_false: Condition "0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_true: Condition "NULL == (dirlst_cur->fi_name = ((0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */) ? ((char const *)dp->d_name[0] == 0) ? (char *)calloc(1UL /* (size_t)1 */, 1UL /* (size_t)1 */) : ({...}) : __strdup(dp->d_name)))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:902:6: cond_false: Condition "OK != Module_Error(ERR_ALLOC, module_name, 902, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:903:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_true: Condition "dp != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:9: cond_false: Condition "*dp->d_name == '.'", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:33: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:773:9: cond_true: Condition "dirlst_cur == dirlst_last", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: cond_false: Condition "!(dirlst_head = (fi_ent *)module_realloc((char *)dirlst_head, (count << 1) * 176UL /* sizeof (fi_ent) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:777:7: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:786:9: cond_true: Condition "!(dirname = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:787:6: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 787, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:791:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:793:9: cond_false: Condition "stat(dirname, &dirlst_cur->fi_stats) < 0", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:798:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:804:9: cond_true: Condition "dirlst_cur->fi_stats.st_mode & 16384", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:813:13: cond_true: Condition "!(tmp = mkdirnm(prefix, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:814:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 814, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:818:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:819:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:823:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:825:13: cond_true: Condition "!(tmp = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:826:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 826, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:830:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:831:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:835:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:841:6: cond_true: Condition "!__coverity_strcmp("CVS", dp->d_name)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:845:3: cond_true: Condition "NULL == stringer(buffer, 1024, tmp, "/.version", NULL)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:847:7: cond_false: Condition "OK != Module_Error(ERR_STRING, module_name, 847, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:848:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:849:3: cond_false: Condition "NULL == (fi = fopen(buffer, "r"))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:852:10: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:878:13: cond_true: Condition "!dirlst_cur->fi_listcount", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:888:9: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:894:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_false: Condition "0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_true: Condition "NULL == (dirlst_cur->fi_name = ((0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */) ? ((char const *)dp->d_name[0] == 0) ? (char *)calloc(1UL /* (size_t)1 */, 1UL /* (size_t)1 */) : ({...}) : __strdup(dp->d_name)))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:902:6: cond_false: Condition "OK != Module_Error(ERR_ALLOC, module_name, 902, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:903:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_true: Condition "dp != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:9: cond_false: Condition "*dp->d_name == '.'", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:33: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:773:9: cond_true: Condition "dirlst_cur == dirlst_last", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: cond_false: Condition "!(dirlst_head = (fi_ent *)module_realloc((char *)dirlst_head, (count << 1) * 176UL /* sizeof (fi_ent) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:777:7: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:786:9: cond_true: Condition "!(dirname = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:787:6: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 787, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:791:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:793:9: cond_false: Condition "stat(dirname, &dirlst_cur->fi_stats) < 0", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:798:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:804:9: cond_true: Condition "dirlst_cur->fi_stats.st_mode & 16384", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:813:13: cond_true: Condition "!(tmp = mkdirnm(prefix, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:814:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 814, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:818:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:819:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:823:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:825:13: cond_true: Condition "!(tmp = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:826:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 826, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:830:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:831:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:835:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:841:6: cond_true: Condition "!__coverity_strcmp("CVS", dp->d_name)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:845:3: cond_true: Condition "NULL == stringer(buffer, 1024, tmp, "/.version", NULL)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:847:7: cond_false: Condition "OK != Module_Error(ERR_STRING, module_name, 847, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:848:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:849:3: cond_false: Condition "NULL == (fi = fopen(buffer, "r"))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:852:10: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:878:13: cond_true: Condition "!dirlst_cur->fi_listcount", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:888:9: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:894:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_false: Condition "0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:901:2: cond_true: Condition "NULL == (dirlst_cur->fi_name = ((0 /* 0 && (size_t)(void const *)&dp->d_name[1] - (size_t)(void const *)dp->d_name == 1 */) ? ((char const *)dp->d_name[0] == 0) ? (char *)calloc(1UL /* (size_t)1 */, 1UL /* (size_t)1 */) : ({...}) : __strdup(dp->d_name)))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:902:6: cond_false: Condition "OK != Module_Error(ERR_ALLOC, module_name, 902, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:903:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_true: Condition "dp != NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:9: cond_false: Condition "*dp->d_name == '.'", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:766:33: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:773:9: cond_true: Condition "dirlst_cur == dirlst_last", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: alloc_fn: Storage is returned from allocation function "module_realloc(void *, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2562:2: alloc_fn: Storage is returned from allocation function "realloc(void *, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2562:2: var_assign: Assigning: "ret" = "realloc(ptr, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2565:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: var_assign: Assigning: "dirlst_head" = "module_realloc((char *)dirlst_head, (count << 1) * 176UL)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:774:13: cond_false: Condition "!(dirlst_head = (fi_ent *)module_realloc((char *)dirlst_head, (count << 1) * 176UL /* sizeof (fi_ent) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:777:7: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:778:13: var_assign: Assigning: "dirlst_cur" = "dirlst_head". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:779:13: var_assign: Assigning: "dirlst_last" = "dirlst_head". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:786:9: cond_true: Condition "!(dirname = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:787:6: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 787, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:791:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:793:9: cond_false: Condition "stat(dirname, &dirlst_cur->fi_stats) < 0", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:798:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:804:9: cond_true: Condition "dirlst_cur->fi_stats.st_mode & 16384", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:813:13: cond_true: Condition "!(tmp = mkdirnm(prefix, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:814:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 814, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:818:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:819:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:823:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:825:13: cond_true: Condition "!(tmp = mkdirnm(dir, dp->d_name))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:826:3: cond_false: Condition "OK != Module_Error(ERR_DIRNAME, module_name, 826, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:830:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:831:6: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:835:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:841:6: cond_true: Condition "!__coverity_strcmp("CVS", dp->d_name)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:845:3: cond_true: Condition "NULL == stringer(buffer, 1024, tmp, "/.version", NULL)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:847:7: cond_false: Condition "OK != Module_Error(ERR_STRING, module_name, 847, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:848:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:849:3: cond_true: Condition "NULL == (fi = fopen(buffer, "r"))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:851:4: continue: Continuing loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop: Looping back >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:765:5: cond_false: Condition "dp != NULL", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:915:5: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:921:5: cond_true: Condition "count > 1", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:922:2: noescape: Resource "dirlst_head" is not freed or pointed-to in function "qsort(void *, size_t, size_t, __compar_fn_t)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:928:5: cond_true: Condition "-1 == closedir(dirptr)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:929:2: cond_false: Condition "OK != Module_Error(ERR_CLOSEDIR, module_name, 929, dir, NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:930:6: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:933:5: return_alloc: Returning allocated memory "dirlst_head". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:518: var_assign: Assigning: "dirlst_head" = storage returned from "get_dir(dir, NULL, &count, &tcount)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:518: cond_false: Condition "NULL == (dirlst_head = get_dir(dir, NULL, &count, &tcount))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:520: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:522: cond_true: Condition "NULL == (cache_list = (char **)module_malloc(tcount * 8UL /* sizeof (char **) */))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:524: cond_true: Condition "OK != Module_Error(ERR_ALLOC, module_name, 524, NULL)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:525: goto: Jumping to label "unwind1" >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:588: label: Reached label "unwind1" >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:589: cond_true: Condition "dir", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:589: cond_true: Condition "selection", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Avail.c:593: leaked_storage: Variable "dirlst_head" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:206: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:206: var_assign: Assigning: "oldval" = storage returned from "EMGetEnv(interp, variable)". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:207: cond_false: Condition "!oldval", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:207: cond_false: Condition "!*oldval", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:208: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:214: cond_true: Condition "!(g_flags & (1055 /* ((1 | 2) | ((4 | 8) | 0x10)) | 0x400 */))", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:214: cond_true: Condition "oldval", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:215: noescape: Resource "oldval" is not freed or pointed-to in function "__coverity_strcmp(char const *, char const *)". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:215: cond_true: Condition "!__coverity_strcmp(value, oldval)", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:216: leaked_storage: Variable "oldval" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:206: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:206: var_assign: Assigning: "oldval" = storage returned from "EMGetEnv(interp, variable)". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:207: cond_false: Condition "!oldval", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:207: cond_true: Condition "!*oldval", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:214: cond_false: Condition "!(g_flags & (1055 /* ((1 | 2) | ((4 | 8) | 0x10)) | 0x400 */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:218: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:238: cond_true: Condition "g_flags & 4", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:240: leaked_storage: Variable "oldval" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:206: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:206: var_assign: Assigning: "oldval" = storage returned from "EMGetEnv(interp, variable)". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:207: cond_false: Condition "!oldval", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:207: cond_true: Condition "!*oldval", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:214: cond_false: Condition "!(g_flags & (1055 /* ((1 | 2) | ((4 | 8) | 0x10)) | 0x400 */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:218: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:238: cond_false: Condition "g_flags & 4", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:241: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:241: cond_false: Condition "g_flags & 8", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:243: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:243: cond_true: Condition "g_flags & 0x10", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:246: cond_true: Condition "marked_val", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:247: cond_true: Condition "marked_val == 4", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:248: leaked_storage: Variable "oldval" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:206: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:206: var_assign: Assigning: "oldval" = storage returned from "EMGetEnv(interp, variable)". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:207: cond_false: Condition "!oldval", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:207: cond_true: Condition "!*oldval", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:214: cond_false: Condition "!(g_flags & (1055 /* ((1 | 2) | ((4 | 8) | 0x10)) | 0x400 */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:218: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:238: cond_false: Condition "g_flags & 4", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:241: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:241: cond_false: Condition "g_flags & 8", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:243: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:243: cond_false: Condition "g_flags & 0x10", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:252: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:252: cond_true: Condition "g_flags & 1", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:252: cond_true: Condition "!force", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:253: leaked_storage: Variable "oldval" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:206: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:206: var_assign: Assigning: "oldval" = storage returned from "EMGetEnv(interp, variable)". >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:207: cond_false: Condition "!oldval", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:207: cond_true: Condition "!*oldval", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:214: cond_false: Condition "!(g_flags & (1055 /* ((1 | 2) | ((4 | 8) | 0x10)) | 0x400 */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:218: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:238: cond_false: Condition "g_flags & 4", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:241: else_branch: Reached else branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:241: cond_true: Condition "g_flags & 8", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:243: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:254: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:261: cond_true: Condition "!(g_flags & (1794 /* ((0x400 | 2) | 0x200) | 0x100 */))", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdSetenv.c:276: leaked_storage: Variable "oldval" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:597: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:597: var_assign: Assigning: "oldpath" = storage returned from "EMGetEnv(interp, variable)". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:598: cond_false: Condition "!oldpath", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:598: cond_false: Condition "!*oldpath", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:602: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:604: noescape: Resource "oldpath" is not freed or pointed-to in function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:604: overwrite_var: Overwriting "oldpath" in "oldpath = stringer(NULL, 0, oldpath, NULL)" leaks the storage that "oldpath" points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:597: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:597: var_assign: Assigning: "oldpath" = storage returned from "EMGetEnv(interp, variable)". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:598: cond_false: Condition "!oldpath", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:598: cond_true: Condition "!*oldpath", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:600: cond_true: Condition "*Tcl_GetStringResult(interp)", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:601: goto: Jumping to label "success0" >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:726: label: Reached label "success0" >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:728: leaked_storage: Variable "oldpath" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:147: cond_false: Condition "g_flags & (768 /* 0x200 | 0x100 */)", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:148: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:157: cond_true: Condition "argc < 3", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:158: cond_false: Condition "OK != Module_Error(ERR_USAGE, module_name, 158, argv[0], " path-variable directory", NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:160: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:165: cond_false: Condition "g_flags & 1", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:166: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:171: cond_true: Condition "!!__coverity_strncmp(argv[0], "pre", 3)", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:171: cond_false: Condition "!(append = !!__coverity_strncmp(argv[0], "pre", 3))", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:172: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:178: cond_false: Condition "g_flags & 0x400", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:180: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:185: cond_false: Condition "g_flags & 2", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:191: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:196: cond_true: Condition "*argv[arg1] == '-'", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:197: cond_true: Condition "!__coverity_strcmp(argv[arg1], "-d")", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:200: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:206: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:215: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:215: var_assign: Assigning: "oldpath" = storage returned from "EMGetEnv(interp, argv[arg1])". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:216: cond_true: Condition "*Tcl_GetStringResult(interp)", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:218: cond_false: Condition "!oldpath", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:218: cond_true: Condition "!*oldpath", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:220: cond_true: Condition "!__coverity_strcmp(argv[arg1], "MANPATH")", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:220: overwrite_var: Overwriting "oldpath" in "oldpath = (!__coverity_strcmp(argv[arg1], "MANPATH") ? stringer(NULL, 0, "/usr/share/man", NULL) : stringer(NULL, 0, "", NULL))" leaks the storage that "oldpath" points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:147: cond_false: Condition "g_flags & (768 /* 0x200 | 0x100 */)", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:148: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:157: cond_true: Condition "argc < 3", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:158: cond_false: Condition "OK != Module_Error(ERR_USAGE, module_name, 158, argv[0], " path-variable directory", NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:160: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:165: cond_false: Condition "g_flags & 1", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:166: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:171: cond_true: Condition "!!__coverity_strncmp(argv[0], "pre", 3)", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:171: cond_false: Condition "!(append = !!__coverity_strncmp(argv[0], "pre", 3))", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:172: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:178: cond_false: Condition "g_flags & 0x400", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:180: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:185: cond_false: Condition "g_flags & 2", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:191: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:196: cond_true: Condition "*argv[arg1] == '-'", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:197: cond_true: Condition "!__coverity_strcmp(argv[arg1], "-d")", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:200: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:206: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:215: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:215: var_assign: Assigning: "oldpath" = storage returned from "EMGetEnv(interp, argv[arg1])". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:216: cond_true: Condition "*Tcl_GetStringResult(interp)", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:218: cond_false: Condition "!oldpath", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:218: cond_false: Condition "!*oldpath", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:223: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:230: cond_true: Condition "!(pathlist = SplitIntoList(interp, (char *)argv[arg1 + 1], &numpaths, delim))", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:232: goto: Jumping to label "unwind0" >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:401: label: Reached label "unwind0" >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:403: leaked_storage: Variable "oldpath" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:147: cond_false: Condition "g_flags & (768 /* 0x200 | 0x100 */)", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:148: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:157: cond_true: Condition "argc < 3", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:158: cond_false: Condition "OK != Module_Error(ERR_USAGE, module_name, 158, argv[0], " path-variable directory", NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:160: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:165: cond_false: Condition "g_flags & 1", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:166: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:171: cond_true: Condition "!!__coverity_strncmp(argv[0], "pre", 3)", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:171: cond_false: Condition "!(append = !!__coverity_strncmp(argv[0], "pre", 3))", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:172: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:178: cond_false: Condition "g_flags & 0x400", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:180: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:185: cond_false: Condition "g_flags & 2", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:191: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:196: cond_true: Condition "*argv[arg1] == '-'", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:197: cond_true: Condition "!__coverity_strcmp(argv[arg1], "-d")", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:200: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:206: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:216: cond_true: Condition "*Tcl_GetStringResult(interp)", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:218: cond_false: Condition "!oldpath", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:218: cond_true: Condition "!*oldpath", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:220: cond_false: Condition "!__coverity_strcmp(argv[arg1], "MANPATH")", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:220: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:220: var_assign: Assigning: "oldpath" = storage returned from "stringer(NULL, 0, "", NULL)". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:230: cond_true: Condition "!(pathlist = SplitIntoList(interp, (char *)argv[arg1 + 1], &numpaths, delim))", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:232: goto: Jumping to label "unwind0" >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:401: label: Reached label "unwind0" >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:403: leaked_storage: Variable "oldpath" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:147: cond_false: Condition "g_flags & (768 /* 0x200 | 0x100 */)", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:148: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:157: cond_true: Condition "argc < 3", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:158: cond_false: Condition "OK != Module_Error(ERR_USAGE, module_name, 158, argv[0], " path-variable directory", NULL)", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:160: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:165: cond_false: Condition "g_flags & 1", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:166: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:171: cond_true: Condition "!!__coverity_strncmp(argv[0], "pre", 3)", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:171: cond_false: Condition "!(append = !!__coverity_strncmp(argv[0], "pre", 3))", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:172: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:178: cond_false: Condition "g_flags & 0x400", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:180: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:185: cond_false: Condition "g_flags & 2", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:191: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:196: cond_true: Condition "*argv[arg1] == '-'", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:197: cond_true: Condition "!__coverity_strcmp(argv[arg1], "-d")", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:200: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:206: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:216: cond_true: Condition "*Tcl_GetStringResult(interp)", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:218: cond_false: Condition "!oldpath", taking false branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:218: cond_true: Condition "!*oldpath", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:220: cond_true: Condition "!__coverity_strcmp(argv[arg1], "MANPATH")", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:220: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:220: var_assign: Assigning: "oldpath" = storage returned from "stringer(NULL, 0, "/usr/share/man", NULL)". >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:230: cond_true: Condition "!(pathlist = SplitIntoList(interp, (char *)argv[arg1 + 1], &numpaths, delim))", taking true branch >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:232: goto: Jumping to label "unwind0" >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:401: label: Reached label "unwind0" >/builddir/build/BUILD/modules-3.2.9/cmdPath.c:403: leaked_storage: Variable "oldpath" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:110: cond_true: Condition "var", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:110: cond_true: Condition "Tcl_GetVar2(interp, "env", "MODULESBEGINENV", 1)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:124: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:124: var_assign: Assigning: "filename" = storage returned from "EMGetEnv(interp, "_MODULESBEGINENV_")". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:125: cond_true: Condition "filename", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:125: cond_true: Condition "*filename", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:132: noescape: Resource "filename" is not freed or pointed-to in function "fopen(char const * restrict, char const * restrict)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:132: cond_true: Condition "NULL != (file = fopen(filename, "a+"))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:134: cond_false: Condition "-1 == fclose(file)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:135: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:136: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:138: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:144: leaked_storage: Variable "filename" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:110: cond_true: Condition "var", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:110: cond_true: Condition "Tcl_GetVar2(interp, "env", "MODULESBEGINENV", 1)", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:125: cond_true: Condition "filename", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:125: cond_true: Condition "*filename", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:126: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:126: var_assign: Assigning: "val" = storage returned from "EMGetEnv(interp, var)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:132: cond_true: Condition "NULL != (file = fopen(filename, "a+"))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:133: noescape: Resource "val" is not freed or pointed-to in function "fprintf(FILE * restrict, char const * restrict, ...)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:134: cond_false: Condition "-1 == fclose(file)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:135: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:136: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:138: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Use.c:144: leaked_storage: Variable "val" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:111: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:111: var_assign: Assigning: "loaded_modules" = storage returned from "EMGetEnv(interp, "LOADEDMODULES")". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:112: cond_false: Condition "!loaded_modules", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:112: cond_false: Condition "!*loaded_modules", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:116: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:118: noescape: Resource "loaded_modules" is not freed or pointed-to in function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:118: cond_false: Condition "NULL == (lmodules = stringer(NULL, 0, loaded_modules, NULL))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:120: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:125: cond_true: Condition "cur_module", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:125: cond_true: Condition "unload_argc < 1023 /* 1024 - 1 */", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:128: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:125: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:125: cond_false: Condition "cur_module", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:128: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:132: cond_true: Condition "reverse < unload_argc", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:134: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:132: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:132: cond_false: Condition "reverse < unload_argc", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:134: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:157: leaked_storage: Variable "loaded_modules" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:111: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:111: var_assign: Assigning: "loaded_modules" = storage returned from "EMGetEnv(interp, "LOADEDMODULES")". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:112: cond_false: Condition "!loaded_modules", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:112: cond_true: Condition "!*loaded_modules", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Purge.c:115: leaked_storage: Variable "loaded_modules" going out of scope leaks the storage it points to. > >Error: RESOURCE_LEAK (CWE-404): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:117: cond_false: Condition "!Tcl_GetVar2(interp, "env", "MODULESBEGINENV", 1)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:120: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:126: cond_false: Condition "!(tmpload = (char *)getenv("LOADEDMODULES"))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:131: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:136: alloc_fn: Storage is returned from allocation function "EMGetEnv(Tcl_Interp *, char const *)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: alloc_fn: Storage is returned from allocation function "stringer(char *, int, ...)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_true: Condition "ptr = va_arg (argptr, char *)", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2930:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2932:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2936:2: cond_false: Condition "tbuf", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2938:2: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2941:2: cond_true: Condition "tbuf == NULL", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2942:3: cond_true: Condition "len == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: alloc_fn: Storage is returned from allocation function "module_malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2545:2: cond_true: Condition "size == 0", taking true branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: alloc_fn: Storage is returned from allocation function "malloc(size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2549:2: var_assign: Assigning: "ret" = "malloc(size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: identity_transfer: Passing variable "ret" as argument 1 to function "memset(void *, int, size_t)", which returns that argument. >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: noescape: Resource "ret" is not freed or pointed-to in function "memset(void *, int, size_t)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2551:2: var_assign: Assigning: "ret" = "memset(ret, 0, size)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2553:2: return_alloc: Returning allocated memory "ret". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: var_assign: Assigning: "tbuf" = "module_malloc(len)". >/builddir/build/BUILD/modules-3.2.9/utility.c:2945:3: cond_false: Condition "NULL == (tbuf = (char *)module_malloc(len))", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2948:3: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:2953:2: cond_false: Condition "ptr = va_arg (argptr, char *)", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:2956:2: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/utility.c:2960:2: return_alloc: Returning allocated memory "tbuf". >/builddir/build/BUILD/modules-3.2.9/utility.c:3174:2: var_assign: Assigning: "string" = "stringer(NULL, 0, value, NULL)". >/builddir/build/BUILD/modules-3.2.9/utility.c:3176:2: cond_false: Condition "!string", taking false branch >/builddir/build/BUILD/modules-3.2.9/utility.c:3178:4: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/utility.c:3180:2: return_alloc: Returning allocated memory "string". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:136: var_assign: Assigning: "filename" = storage returned from "EMGetEnv(interp, "_MODULESBEGINENV_")". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:137: cond_true: Condition "filename", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:137: cond_true: Condition "*filename", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:142: noescape: Resource "filename" is not freed or pointed-to in function "fopen(char const * restrict, char const * restrict)". >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:142: cond_true: Condition "NULL != (file = fopen(filename, "r"))", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:144: cond_false: Condition "NULL == (buf = stringer(NULL, buffer_size, NULL))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:146: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:148: cond_false: Condition "!feof(file)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:211: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:218: cond_false: Condition "-1 == fclose(file)", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:220: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:222: if_fallthrough: Falling through to end of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:227: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:234: cond_false: Condition "NULL == (load_list = (char **)module_malloc(maxlist * 8UL /* sizeof (char **) */))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:236: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:238: cond_false: Condition "NULL == (loaded = stringer(NULL, 0, tmpload, NULL))", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:240: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:245: cond_true: Condition "*loaded", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:247: cond_true: Condition "load_list[list_count - 1]", taking true branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:256: cond_false: Condition "list_count >= maxlist", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:264: if_end: End of if statement >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:265: loop: Jumping back to the beginning of the loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:247: loop_begin: Jumped back to beginning of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:247: cond_false: Condition "load_list[list_count - 1]", taking false branch >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:265: loop_end: Reached end of loop >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:284: leaked_storage: Variable "filename" going out of scope leaks the storage it points to. > >Error: SIZEOF_MISMATCH (CWE-569): >/builddir/build/BUILD/modules-3.2.9/locate_module.c:1100: suspicious_sizeof: Passing argument "srclist" of type "char **" and argument "listsize * 8UL /* sizeof (char **) */" to function "module_realloc(void *, size_t)" is suspicious. Did you intend to use "sizeof(char *)" instead of "sizeof (char **)" ? In this particular case sizeof(char **) happens to be equal to sizeof(char *), but this is not a portable assumption. > >Error: SIZEOF_MISMATCH (CWE-569): >/builddir/build/BUILD/modules-3.2.9/ModuleCmd_Update.c:259: suspicious_sizeof: Passing argument "load_list" of type "char **" and argument "maxlist * 8UL /* sizeof (char **) */" to function "module_realloc(void *, size_t)" is suspicious. Did you intend to use "sizeof(char *)" instead of "sizeof (char **)" ? In this particular case sizeof(char **) happens to be equal to sizeof(char *), but this is not a portable assumption.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 874662
: 640888