mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-08 06:00:15 +01:00
XQuartz: Silence a clang static analysis warning about a possible memory leak on exit
stub.c:356:9: warning: Potential leak of memory pointed to by 'newargv'
asl_log(aslc, NULL, ASL_LEVEL_ERR,
^~~~~~~
stub.c:356:9: warning: Potential leak of memory pointed to by 'newenvp'
asl_log(aslc, NULL, ASL_LEVEL_ERR,
^~~~~~~
2 warnings generated.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit b2f6b3497c)
This commit is contained in:
parent
f218c147c2
commit
b915cbb6bf
1 changed files with 4 additions and 0 deletions
|
|
@ -353,6 +353,10 @@ main(int argc, char **argv, char **envp)
|
|||
newenvp = (string_array_t)calloc((1 + envpc), sizeof(string_t));
|
||||
|
||||
if (!newargv || !newenvp) {
|
||||
/* Silence the clang static analyzer */
|
||||
free(newargv);
|
||||
free(newenvp);
|
||||
|
||||
asl_log(aslc, NULL, ASL_LEVEL_ERR,
|
||||
"Xquartz: Memory allocation failure");
|
||||
return EXIT_FAILURE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue