nl_recv: Don't update *buf in error path
iov.iov_base is either NULL or invalid
This commit is contained in:
parent
ceb8fb9e87
commit
6d52ae6440
1 changed files with 2 additions and 3 deletions
5
lib/nl.c
5
lib/nl.c
|
@ -551,9 +551,8 @@ abort:
|
|||
if (retval <= 0) {
|
||||
free(iov.iov_base); iov.iov_base = NULL;
|
||||
free(tmpcreds); tmpcreds = NULL;
|
||||
}
|
||||
|
||||
*buf = iov.iov_base;
|
||||
} else
|
||||
*buf = iov.iov_base;
|
||||
|
||||
if (creds)
|
||||
*creds = tmpcreds;
|
||||
|
|
Loading…
Add table
Reference in a new issue