mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
Fix potential NULL-write in aa_getprocattr() error path
https://bugs.launchpad.net/apparmor/+bug/1196880 Patch by Gernot Vormayr <gvormayr@gmail.com> Acked-by: Seth Arnold <seth.arnold@canonical.com> Acked-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
2c6e1b6e0f
commit
b77a05aa52
1 changed files with 2 additions and 1 deletions
|
@ -279,6 +279,7 @@ int aa_getprocattr(pid_t tid, const char *attr, char **buf, char **mode)
|
|||
if (rc == -1) {
|
||||
free(buffer);
|
||||
*buf = NULL;
|
||||
if (mode)
|
||||
*mode = NULL;
|
||||
} else
|
||||
*buf = buffer;
|
||||
|
|
Loading…
Add table
Reference in a new issue