Task #131578 - fixed.err

back to task #131578
download
Error: GCC_ANALYZER_WARNING (CWE-401):
libedit-20251016-3.1/src/eln.c:228:23: warning[-Wanalyzer-malloc-leak]: leak of 'wcsdup(*<unknown>)'
libedit-20251016-3.1/src/eln.c:110:12: branch_false: following 'false' branch (when 'el' is non-NULL)...
libedit-20251016-3.1/src/eln.c:112:9: branch_false: ...to here
libedit-20251016-3.1/src/eln.c:223:20: branch_false: following 'false' branch...
libedit-20251016-3.1/src/eln.c:228:57: branch_false: ...to here
libedit-20251016-3.1/src/eln.c:228:39: acquire_memory: allocated here
libedit-20251016-3.1/src/eln.c:228:23: danger: 'wcsdup(*<unknown>)' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  226|   		}
#  227|   		/* XXX: The two strdup's leak */
#  228|-> 		ret = map_addfunc(el, wcsdup(wargv[0]), wcsdup(wargv[1]),
#  229|   		    func);
#  230|   		el_free(wargv);

Error: GCC_ANALYZER_WARNING (CWE-401):
libedit-20251016-3.1/src/eln.c:228:39: warning[-Wanalyzer-malloc-leak]: leak of 'wcsdup(<unknown>[1])'
libedit-20251016-3.1/src/eln.c:110:12: branch_false: following 'false' branch (when 'el' is non-NULL)...
libedit-20251016-3.1/src/eln.c:112:9: branch_false: ...to here
libedit-20251016-3.1/src/eln.c:223:20: branch_false: following 'false' branch...
libedit-20251016-3.1/src/eln.c:228:57: branch_false: ...to here
libedit-20251016-3.1/src/eln.c:228:57: acquire_memory: allocated here
libedit-20251016-3.1/src/eln.c:228:39: danger: 'wcsdup(<unknown>[1])' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  226|   		}
#  227|   		/* XXX: The two strdup's leak */
#  228|-> 		ret = map_addfunc(el, wcsdup(wargv[0]), wcsdup(wargv[1]),
#  229|   		    func);
#  230|   		el_free(wargv);