Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumpclient fix build on NetBSD. also, prevent fd lea...
details: https://anonhg.NetBSD.org/src/rev/50e5cef3d146
branches: trunk
changeset: 328402:50e5cef3d146
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Apr 02 15:04:19 2014 +0000
description:
fix build on NetBSD. also, prevent fd leak in error path
diffstat:
lib/librumpclient/rumpclient.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 41d44c111da4 -r 50e5cef3d146 lib/librumpclient/rumpclient.c
--- a/lib/librumpclient/rumpclient.c Wed Apr 02 14:48:03 2014 +0000
+++ b/lib/librumpclient/rumpclient.c Wed Apr 02 15:04:19 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpclient.c,v 1.58 2014/04/02 14:48:03 pooka Exp $ */
+/* $NetBSD: rumpclient.c,v 1.59 2014/04/02 15:04:19 pooka Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -50,7 +50,7 @@
#define USE_SIGNALFD
#endif
-__RCSID("$NetBSD: rumpclient.c,v 1.58 2014/04/02 14:48:03 pooka Exp $");
+__RCSID("$NetBSD: rumpclient.c,v 1.59 2014/04/02 15:04:19 pooka Exp $");
#include <sys/param.h>
#include <sys/mman.h>
@@ -712,7 +712,9 @@
EVFILT_READ, EV_ADD|EV_ENABLE, 0, 0, 0);
if (host_kevent(fd, kev, NSIG+1, NULL, 0, NULL) == -1) {
ERRLOG(("rump_sp: kevent() failed"));
+ host_close(fd);
return -1;
+ }
return fd;
}
Home |
Main Index |
Thread Index |
Old Index