diff options
author | Thomas Graf <tgraf@redhat.com> | 2012-11-06 00:21:35 +0100 |
---|---|---|
committer | Thomas Graf <tgraf@redhat.com> | 2012-11-06 00:21:35 +0100 |
commit | 6d52ae6440fe324e94b1a08ebd40bc6e81d333f3 (patch) | |
tree | 43fcfc752d509ebd28022dc44539032c0e49baa4 | |
parent | ceb8fb9e8747dd21f4067720e1090384910d348b (diff) | |
download | libnl-6d52ae6440fe324e94b1a08ebd40bc6e81d333f3.tar.gz |
nl_recv: Don't update *buf in error path
iov.iov_base is either NULL or invalid
-rw-r--r-- | lib/nl.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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; |