diff mbox

[1/5,librdmacm] rsocket: add missing va_end() after calling va_end()

Message ID 1349785672-1921-2-git-send-email-dotanb@dev.mellanox.co.il (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Dotan Barak Oct. 9, 2012, 12:27 p.m. UTC
Not doing so, may lead to resource leak.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
---
 src/rsocket.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/src/rsocket.c b/src/rsocket.c
index 4c4821b..278c8ec 100644
--- a/src/rsocket.c
+++ b/src/rsocket.c
@@ -2002,6 +2002,7 @@  int rfcntl(int socket, int cmd, ... /* arg */ )
 	va_start(args, cmd);
 	switch (cmd) {
 	case F_GETFL:
+		va_end(args);
 		return (int) rs->fd_flags;
 	case F_SETFL:
 		param = va_arg(args, long);