From 6d52ae6440fe324e94b1a08ebd40bc6e81d333f3 Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Tue, 6 Nov 2012 00:21:35 +0100 Subject: [PATCH] nl_recv: Don't update *buf in error path iov.iov_base is either NULL or invalid --- lib/nl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/nl.c b/lib/nl.c index 0ed248e..6ba4828 100644 --- a/lib/nl.c +++ b/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; -- 2.40.0