From 86e9ab79ce381f5e30f6319f102850f52e042fec Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Mon, 8 Jun 2015 20:46:09 +0200 Subject: [PATCH] Linux: Fixed not needed call to close() on error. It was called if file descriptor was none and -1. --- src/haptic/linux/SDL_syshaptic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c index 1ababa62e46b8..7071cc50bba10 100644 --- a/src/haptic/linux/SDL_syshaptic.c +++ b/src/haptic/linux/SDL_syshaptic.c @@ -390,8 +390,8 @@ SDL_SYS_HapticName(int index) /* No name found, return device character device */ name = item->fname; } + close(fd); } - close(fd); return name; }