Remove unnecessary parentheses and an unnecessary free() of a NULL pointer. (Thanks, Simon!) Fixes Bugzilla #2881.
diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c
index 63c81ab..fba536b 100644
--- a/src/haptic/linux/SDL_syshaptic.c
+++ b/src/haptic/linux/SDL_syshaptic.c
@@ -288,8 +288,7 @@ MaybeAddDevice(const char *path)
}
item->fname = SDL_strdup(path);
- if ( (item->fname == NULL) ) {
- SDL_free(item->fname);
+ if (item->fname == NULL) {
SDL_free(item);
return -1;
}