mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Xnamespace: fix possible memleak
In an OOM error path, we've forgotten an free() call. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
0102f4361f
commit
b766775eb0
@@ -115,6 +115,7 @@ static void parseLine(char *line, struct Xnamespace **walk_ns)
|
||||
new_token->authTokenLen = strlen(token)/2;
|
||||
new_token->authTokenData = calloc(1, new_token->authTokenLen);
|
||||
if (!new_token->authTokenData) {
|
||||
free(new_token->authProto);
|
||||
free(new_token);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user