Commit a309755961a2eccf73aced8c6ecc962c82153166

Ryan C. Gordon 2015-02-19T13:11:19

Remove unnecessary parentheses and an unnecessary free() of a NULL pointer. (Thanks, Simon!) Fixes Bugzilla #2881.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
     }