diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c index 63c81ab9b..fba536b48 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; }