summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-12 16:20:52 +0100
committerThomas Haller <thaller@redhat.com>2016-02-16 14:13:25 +0100
commitdc97a3b39b75228c9b436d416167db30bc48163a (patch)
treefe60cbb1c69695d46e6cb391aefc1da9a156dd16
parent43381f9b854d76c0cf4cb7b7413eeeee09cc885c (diff)
downloadNetworkManager-dc97a3b39b75228c9b436d416167db30bc48163a.tar.gz
platform: fix error handling in event_handler_recvmsgs()
@abort_parsing is set TRUE at two places, which also explicitly set @err to something. We don't want to reset @err and got to the next @hdr. Instead error out first.
-rw-r--r--src/platform/nm-linux-platform.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 3469a8289e..76ca16f306 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -5697,11 +5697,12 @@ continue_reading:
}
event_seq_check (platform, msg, seq_result);
- err = 0;
- hdr = nlmsg_next (hdr, &n);
if (abort_parsing)
goto out;
+
+ err = 0;
+ hdr = nlmsg_next (hdr, &n);
}
if (multipart) {